diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index c533b2c4dd6..65c8e682d09 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -889,6 +889,35 @@ "https://www.googleapis.com/auth/analytics.edit" ] }, + "runAccessReport": { + "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. The property must be in Google Analytics 360. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "flatPath": "v1alpha/properties/{propertiesId}:runAccessReport", + "httpMethod": "POST", + "id": "analyticsadmin.properties.runAccessReport", + "parameterOrder": [ + "entity" + ], + "parameters": { + "entity": { + "description": "The Data Access Report is requested for this property. For example if \"123\" is your GA4 property ID, then entity should be \"properties/123\".", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+entity}:runAccessReport", + "request": { + "$ref": "GoogleAnalyticsAdminV1alphaRunAccessReportRequest" + }, + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaRunAccessReportResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, "updateAttributionSettings": { "description": "Updates attribution settings on a property.", "flatPath": "v1alpha/properties/{propertiesId}/attributionSettings", @@ -2616,9 +2645,373 @@ } } }, - "revision": "20220606", + "revision": "20220625", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { + "GoogleAnalyticsAdminV1alphaAccessBetweenFilter": { + "description": "To express that the result needs to be between two numbers (inclusive).", + "id": "GoogleAnalyticsAdminV1alphaAccessBetweenFilter", + "properties": { + "fromValue": { + "$ref": "GoogleAnalyticsAdminV1alphaNumericValue", + "description": "Begins with this number." + }, + "toValue": { + "$ref": "GoogleAnalyticsAdminV1alphaNumericValue", + "description": "Ends with this number." + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessDateRange": { + "description": "A contiguous range of days: startDate, startDate + 1, ..., endDate.", + "id": "GoogleAnalyticsAdminV1alphaAccessDateRange", + "properties": { + "endDate": { + "description": "The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot be before `startDate`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the current time in the request's time zone.", + "type": "string" + }, + "startDate": { + "description": "The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot be after `endDate`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the current time in the request's time zone.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessDimension": { + "description": "Dimensions are attributes of your data. For example, the dimension `userEmail` indicates the email of the user that accessed reporting data. Dimension values in report responses are strings.", + "id": "GoogleAnalyticsAdminV1alphaAccessDimension", + "properties": { + "dimensionName": { + "description": "The API name of the dimension. Dimensions are referenced by name in `dimensionFilter` and `orderBys`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessDimensionHeader": { + "description": "Describes a dimension column in the report. Dimensions requested in a report produce column entries within rows and DimensionHeaders. However, dimensions used exclusively within filters or expressions do not produce columns in a report; correspondingly, those dimensions do not produce headers.", + "id": "GoogleAnalyticsAdminV1alphaAccessDimensionHeader", + "properties": { + "dimensionName": { + "description": "The dimension's name; for example 'country'.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessDimensionValue": { + "description": "The value of a dimension.", + "id": "GoogleAnalyticsAdminV1alphaAccessDimensionValue", + "properties": { + "value": { + "description": "The dimension value. For example, this value may be 'France' for the 'country' dimension.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessFilter": { + "description": "An expression to filter dimension or metric values.", + "id": "GoogleAnalyticsAdminV1alphaAccessFilter", + "properties": { + "betweenFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessBetweenFilter", + "description": "A filter for two values." + }, + "fieldName": { + "description": "The dimension name or metric name.", + "type": "string" + }, + "inListFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessInListFilter", + "description": "A filter for in list values." + }, + "numericFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessNumericFilter", + "description": "A filter for numeric or date values." + }, + "stringFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessStringFilter", + "description": "Strings related filter." + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessFilterExpression": { + "description": "Expresses dimension or metric filters. The fields in the same expression need to be either all dimensions or all metrics.", + "id": "GoogleAnalyticsAdminV1alphaAccessFilterExpression", + "properties": { + "accessFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessFilter", + "description": "A primitive filter. In the same FilterExpression, all of the filter's field names need to be either all dimensions or all metrics." + }, + "andGroup": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessFilterExpressionList", + "description": "Each of the FilterExpressions in the and_group has an AND relationship." + }, + "notExpression": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessFilterExpression", + "description": "The FilterExpression is NOT of not_expression." + }, + "orGroup": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessFilterExpressionList", + "description": "Each of the FilterExpressions in the or_group has an OR relationship." + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessFilterExpressionList": { + "description": "A list of filter expressions.", + "id": "GoogleAnalyticsAdminV1alphaAccessFilterExpressionList", + "properties": { + "expressions": { + "description": "A list of filter expressions.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessFilterExpression" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessInListFilter": { + "description": "The result needs to be in a list of string values.", + "id": "GoogleAnalyticsAdminV1alphaAccessInListFilter", + "properties": { + "caseSensitive": { + "description": "If true, the string value is case sensitive.", + "type": "boolean" + }, + "values": { + "description": "The list of string values. Must be non-empty.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessMetric": { + "description": "The quantitative measurements of a report. For example, the metric `accessCount` is the total number of data access records.", + "id": "GoogleAnalyticsAdminV1alphaAccessMetric", + "properties": { + "metricName": { + "description": "The API name of the metric. Metrics are referenced by name in `metricFilter` \u0026 `orderBys`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessMetricHeader": { + "description": "Describes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers.", + "id": "GoogleAnalyticsAdminV1alphaAccessMetricHeader", + "properties": { + "metricName": { + "description": "The metric's name; for example 'accessCount'.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessMetricValue": { + "description": "The value of a metric.", + "id": "GoogleAnalyticsAdminV1alphaAccessMetricValue", + "properties": { + "value": { + "description": "The measurement value. For example, this value may be '13'.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessNumericFilter": { + "description": "Filters for numeric or date values.", + "id": "GoogleAnalyticsAdminV1alphaAccessNumericFilter", + "properties": { + "operation": { + "description": "The operation type for this filter.", + "enum": [ + "OPERATION_UNSPECIFIED", + "EQUAL", + "LESS_THAN", + "LESS_THAN_OR_EQUAL", + "GREATER_THAN", + "GREATER_THAN_OR_EQUAL" + ], + "enumDescriptions": [ + "Unspecified.", + "Equal", + "Less than", + "Less than or equal", + "Greater than", + "Greater than or equal" + ], + "type": "string" + }, + "value": { + "$ref": "GoogleAnalyticsAdminV1alphaNumericValue", + "description": "A numeric value or a date value." + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessOrderBy": { + "description": "Order bys define how rows will be sorted in the response. For example, ordering rows by descending access count is one ordering, and ordering rows by the country string is a different ordering.", + "id": "GoogleAnalyticsAdminV1alphaAccessOrderBy", + "properties": { + "desc": { + "description": "If true, sorts by descending order. If false or unspecified, sorts in ascending order.", + "type": "boolean" + }, + "dimension": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessOrderByDimensionOrderBy", + "description": "Sorts results by a dimension's values." + }, + "metric": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessOrderByMetricOrderBy", + "description": "Sorts results by a metric's values." + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessOrderByDimensionOrderBy": { + "description": "Sorts by dimension values.", + "id": "GoogleAnalyticsAdminV1alphaAccessOrderByDimensionOrderBy", + "properties": { + "dimensionName": { + "description": "A dimension name in the request to order by.", + "type": "string" + }, + "orderType": { + "description": "Controls the rule for dimension value ordering.", + "enum": [ + "ORDER_TYPE_UNSPECIFIED", + "ALPHANUMERIC", + "CASE_INSENSITIVE_ALPHANUMERIC", + "NUMERIC" + ], + "enumDescriptions": [ + "Unspecified.", + "Alphanumeric sort by Unicode code point. For example, \"2\" \u003c \"A\" \u003c \"X\" \u003c \"b\" \u003c \"z\".", + "Case insensitive alphanumeric sort by lower case Unicode code point. For example, \"2\" \u003c \"A\" \u003c \"b\" \u003c \"X\" \u003c \"z\".", + "Dimension values are converted to numbers before sorting. For example in NUMERIC sort, \"25\" \u003c \"100\", and in `ALPHANUMERIC` sort, \"100\" \u003c \"25\". Non-numeric dimension values all have equal ordering value below all numeric values." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessOrderByMetricOrderBy": { + "description": "Sorts by metric values.", + "id": "GoogleAnalyticsAdminV1alphaAccessOrderByMetricOrderBy", + "properties": { + "metricName": { + "description": "A metric name in the request to order by.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessQuota": { + "description": "Current state of all quotas for this Analytics property. If any quota for a property is exhausted, all requests to that property will return Resource Exhausted errors.", + "id": "GoogleAnalyticsAdminV1alphaAccessQuota", + "properties": { + "concurrentRequests": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessQuotaStatus", + "description": "Properties can use up to 50 concurrent requests." + }, + "serverErrorsPerProjectPerHour": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessQuotaStatus", + "description": "Properties and cloud project pairs can have up to 50 server errors per hour." + }, + "tokensPerDay": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessQuotaStatus", + "description": "Properties can use 250,000 tokens per day. Most requests consume fewer than 10 tokens." + }, + "tokensPerHour": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessQuotaStatus", + "description": "Properties can use 50,000 tokens per hour. An API request consumes a single number of tokens, and that number is deducted from both the hourly and daily quotas." + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessQuotaStatus": { + "description": "Current state for a particular quota group.", + "id": "GoogleAnalyticsAdminV1alphaAccessQuotaStatus", + "properties": { + "consumed": { + "description": "Quota consumed by this request.", + "format": "int32", + "type": "integer" + }, + "remaining": { + "description": "Quota remaining after this request.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessRow": { + "description": "Access report data for each row.", + "id": "GoogleAnalyticsAdminV1alphaAccessRow", + "properties": { + "dimensionValues": { + "description": "List of dimension values. These values are in the same order as specified in the request.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessDimensionValue" + }, + "type": "array" + }, + "metricValues": { + "description": "List of metric values. These values are in the same order as specified in the request.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessMetricValue" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaAccessStringFilter": { + "description": "The filter for strings.", + "id": "GoogleAnalyticsAdminV1alphaAccessStringFilter", + "properties": { + "caseSensitive": { + "description": "If true, the string value is case sensitive.", + "type": "boolean" + }, + "matchType": { + "description": "The match type for this filter.", + "enum": [ + "MATCH_TYPE_UNSPECIFIED", + "EXACT", + "BEGINS_WITH", + "ENDS_WITH", + "CONTAINS", + "FULL_REGEXP", + "PARTIAL_REGEXP" + ], + "enumDescriptions": [ + "Unspecified", + "Exact match of the string value.", + "Begins with the string value.", + "Ends with the string value.", + "Contains the string value.", + "Full match for the regular expression with the string value.", + "Partial match for the regular expression with the string value." + ], + "type": "string" + }, + "value": { + "description": "The string value used for the matching.", + "type": "string" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaAccount": { "description": "A resource message representing a Google Analytics account.", "id": "GoogleAnalyticsAdminV1alphaAccount", @@ -3961,6 +4354,23 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1alphaNumericValue": { + "description": "To represent a number.", + "id": "GoogleAnalyticsAdminV1alphaNumericValue", + "properties": { + "doubleValue": { + "description": "Double value", + "format": "double", + "type": "number" + }, + "int64Value": { + "description": "Integer value", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaProperty": { "description": "A resource message representing a Google Analytics GA4 property.", "id": "GoogleAnalyticsAdminV1alphaProperty", @@ -4171,6 +4581,104 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1alphaRunAccessReportRequest": { + "description": "The request for a Data Access Record Report.", + "id": "GoogleAnalyticsAdminV1alphaRunAccessReportRequest", + "properties": { + "dateRanges": { + "description": "Date ranges of access records to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the access records for the overlapping days is included in the response rows for both date ranges. Requests are allowed up to 2 date ranges.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessDateRange" + }, + "type": "array" + }, + "dimensionFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessFilterExpression", + "description": "Dimension filters allow you to restrict report response to specific dimension values which match the filter. For example, filtering on access records of a single user. To learn more, see [Fundamentals of Dimension Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) for examples. Metrics cannot be used in this filter." + }, + "dimensions": { + "description": "The dimensions requested and displayed in the response. Requests are allowed up to 9 dimensions.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessDimension" + }, + "type": "array" + }, + "limit": { + "description": "The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 100,000 rows per request, no matter how many you ask for. `limit` must be positive. The API may return fewer rows than the requested `limit`, if there aren't as many remaining rows as the `limit`. For instance, there are fewer than 300 possible values for the dimension `country`, so when reporting on only `country`, you can't get more than 300 rows, even if you set `limit` to a higher value. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).", + "format": "int64", + "type": "string" + }, + "metricFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessFilterExpression", + "description": "Metric filters allow you to restrict report response to specific metric values which match the filter. Metric filters are applied after aggregating the report's rows, similar to SQL having-clause. Dimensions cannot be used in this filter." + }, + "metrics": { + "description": "The metrics requested and displayed in the response. Requests are allowed up to 10 metrics.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessMetric" + }, + "type": "array" + }, + "offset": { + "description": "The row count of the start row. The first row is counted as row 0. If offset is unspecified, it is treated as 0. If offset is zero, then this method will return the first page of results with `limit` entries. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).", + "format": "int64", + "type": "string" + }, + "orderBys": { + "description": "Specifies how rows are ordered in the response.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessOrderBy" + }, + "type": "array" + }, + "returnPropertyQuota": { + "description": "Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).", + "type": "boolean" + }, + "timeZone": { + "description": "This request's time zone if specified. If unspecified, the property's time zone is used. The request's time zone is used to interpret the start \u0026 end dates of the report. Formatted as strings from the IANA Time Zone database (https://www.iana.org/time-zones); for example \"America/New_York\" or \"Asia/Tokyo\".", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaRunAccessReportResponse": { + "description": "The customized Data Access Record Report response.", + "id": "GoogleAnalyticsAdminV1alphaRunAccessReportResponse", + "properties": { + "dimensionHeaders": { + "description": "The header for a column in the report that corresponds to a specific dimension. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessDimensionHeader" + }, + "type": "array" + }, + "metricHeaders": { + "description": "The header for a column in the report that corresponds to a specific metric. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessMetricHeader" + }, + "type": "array" + }, + "quota": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessQuota", + "description": "The quota state for this Analytics property including this request." + }, + "rowCount": { + "description": "The total number of rows in the query result. `rowCount` is independent of the number of rows returned in the response, the `limit` request parameter, and the `offset` request parameter. For example if a query returns 175 rows and includes `limit` of 50 in the API request, the response will contain `rowCount` of 175 but only 50 rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).", + "format": "int32", + "type": "integer" + }, + "rows": { + "description": "Rows of dimension value combinations and metric values in the report.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAccessRow" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest": { "description": "Request message for SearchChangeHistoryEvents RPC.", "id": "GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest", diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index 31f16015c18..9ad0b3853f0 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -317,6 +317,716 @@ type PropertiesUserLinksService struct { s *Service } +// GoogleAnalyticsAdminV1alphaAccessBetweenFilter: To express that the +// result needs to be between two numbers (inclusive). +type GoogleAnalyticsAdminV1alphaAccessBetweenFilter struct { + // FromValue: Begins with this number. + FromValue *GoogleAnalyticsAdminV1alphaNumericValue `json:"fromValue,omitempty"` + + // ToValue: Ends with this number. + ToValue *GoogleAnalyticsAdminV1alphaNumericValue `json:"toValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FromValue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FromValue") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessBetweenFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessBetweenFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessDateRange: A contiguous range of +// days: startDate, startDate + 1, ..., endDate. +type GoogleAnalyticsAdminV1alphaAccessDateRange struct { + // EndDate: The inclusive end date for the query in the format + // `YYYY-MM-DD`. Cannot be before `startDate`. The format `NdaysAgo`, + // `yesterday`, or `today` is also accepted, and in that case, the date + // is inferred based on the current time in the request's time zone. + EndDate string `json:"endDate,omitempty"` + + // StartDate: The inclusive start date for the query in the format + // `YYYY-MM-DD`. Cannot be after `endDate`. The format `NdaysAgo`, + // `yesterday`, or `today` is also accepted, and in that case, the date + // is inferred based on the current time in the request's time zone. + StartDate string `json:"startDate,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndDate") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndDate") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessDateRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessDateRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessDimension: Dimensions are attributes +// of your data. For example, the dimension `userEmail` indicates the +// email of the user that accessed reporting data. Dimension values in +// report responses are strings. +type GoogleAnalyticsAdminV1alphaAccessDimension struct { + // DimensionName: The API name of the dimension. Dimensions are + // referenced by name in `dimensionFilter` and `orderBys`. + DimensionName string `json:"dimensionName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DimensionName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DimensionName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessDimension) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessDimension + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessDimensionHeader: Describes a +// dimension column in the report. Dimensions requested in a report +// produce column entries within rows and DimensionHeaders. However, +// dimensions used exclusively within filters or expressions do not +// produce columns in a report; correspondingly, those dimensions do not +// produce headers. +type GoogleAnalyticsAdminV1alphaAccessDimensionHeader struct { + // DimensionName: The dimension's name; for example 'country'. + DimensionName string `json:"dimensionName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DimensionName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DimensionName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessDimensionHeader) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessDimensionHeader + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessDimensionValue: The value of a +// dimension. +type GoogleAnalyticsAdminV1alphaAccessDimensionValue struct { + // Value: The dimension value. For example, this value may be 'France' + // for the 'country' dimension. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Value") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Value") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessDimensionValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessDimensionValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessFilter: An expression to filter +// dimension or metric values. +type GoogleAnalyticsAdminV1alphaAccessFilter struct { + // BetweenFilter: A filter for two values. + BetweenFilter *GoogleAnalyticsAdminV1alphaAccessBetweenFilter `json:"betweenFilter,omitempty"` + + // FieldName: The dimension name or metric name. + FieldName string `json:"fieldName,omitempty"` + + // InListFilter: A filter for in list values. + InListFilter *GoogleAnalyticsAdminV1alphaAccessInListFilter `json:"inListFilter,omitempty"` + + // NumericFilter: A filter for numeric or date values. + NumericFilter *GoogleAnalyticsAdminV1alphaAccessNumericFilter `json:"numericFilter,omitempty"` + + // StringFilter: Strings related filter. + StringFilter *GoogleAnalyticsAdminV1alphaAccessStringFilter `json:"stringFilter,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BetweenFilter") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BetweenFilter") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessFilterExpression: Expresses +// dimension or metric filters. The fields in the same expression need +// to be either all dimensions or all metrics. +type GoogleAnalyticsAdminV1alphaAccessFilterExpression struct { + // AccessFilter: A primitive filter. In the same FilterExpression, all + // of the filter's field names need to be either all dimensions or all + // metrics. + AccessFilter *GoogleAnalyticsAdminV1alphaAccessFilter `json:"accessFilter,omitempty"` + + // AndGroup: Each of the FilterExpressions in the and_group has an AND + // relationship. + AndGroup *GoogleAnalyticsAdminV1alphaAccessFilterExpressionList `json:"andGroup,omitempty"` + + // NotExpression: The FilterExpression is NOT of not_expression. + NotExpression *GoogleAnalyticsAdminV1alphaAccessFilterExpression `json:"notExpression,omitempty"` + + // OrGroup: Each of the FilterExpressions in the or_group has an OR + // relationship. + OrGroup *GoogleAnalyticsAdminV1alphaAccessFilterExpressionList `json:"orGroup,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessFilter") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessFilter") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessFilterExpression) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessFilterExpression + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessFilterExpressionList: A list of +// filter expressions. +type GoogleAnalyticsAdminV1alphaAccessFilterExpressionList struct { + // Expressions: A list of filter expressions. + Expressions []*GoogleAnalyticsAdminV1alphaAccessFilterExpression `json:"expressions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Expressions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleAnalyticsAdminV1alphaAccessFilterExpressionList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessFilterExpressionList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessInListFilter: The result needs to be +// in a list of string values. +type GoogleAnalyticsAdminV1alphaAccessInListFilter struct { + // CaseSensitive: If true, the string value is case sensitive. + CaseSensitive bool `json:"caseSensitive,omitempty"` + + // Values: The list of string values. Must be non-empty. + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CaseSensitive") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CaseSensitive") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessInListFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessInListFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessMetric: The quantitative +// measurements of a report. For example, the metric `accessCount` is +// the total number of data access records. +type GoogleAnalyticsAdminV1alphaAccessMetric struct { + // MetricName: The API name of the metric. Metrics are referenced by + // name in `metricFilter` & `orderBys`. + MetricName string `json:"metricName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MetricName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MetricName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessMetric) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessMetric + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessMetricHeader: Describes a metric +// column in the report. Visible metrics requested in a report produce +// column entries within rows and MetricHeaders. However, metrics used +// exclusively within filters or expressions do not produce columns in a +// report; correspondingly, those metrics do not produce headers. +type GoogleAnalyticsAdminV1alphaAccessMetricHeader struct { + // MetricName: The metric's name; for example 'accessCount'. + MetricName string `json:"metricName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MetricName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MetricName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessMetricHeader) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessMetricHeader + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessMetricValue: The value of a metric. +type GoogleAnalyticsAdminV1alphaAccessMetricValue struct { + // Value: The measurement value. For example, this value may be '13'. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Value") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Value") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessMetricValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessNumericFilter: Filters for numeric +// or date values. +type GoogleAnalyticsAdminV1alphaAccessNumericFilter struct { + // Operation: The operation type for this filter. + // + // Possible values: + // "OPERATION_UNSPECIFIED" - Unspecified. + // "EQUAL" - Equal + // "LESS_THAN" - Less than + // "LESS_THAN_OR_EQUAL" - Less than or equal + // "GREATER_THAN" - Greater than + // "GREATER_THAN_OR_EQUAL" - Greater than or equal + Operation string `json:"operation,omitempty"` + + // Value: A numeric value or a date value. + Value *GoogleAnalyticsAdminV1alphaNumericValue `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Operation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Operation") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessNumericFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessNumericFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessOrderBy: Order bys define how rows +// will be sorted in the response. For example, ordering rows by +// descending access count is one ordering, and ordering rows by the +// country string is a different ordering. +type GoogleAnalyticsAdminV1alphaAccessOrderBy struct { + // Desc: If true, sorts by descending order. If false or unspecified, + // sorts in ascending order. + Desc bool `json:"desc,omitempty"` + + // Dimension: Sorts results by a dimension's values. + Dimension *GoogleAnalyticsAdminV1alphaAccessOrderByDimensionOrderBy `json:"dimension,omitempty"` + + // Metric: Sorts results by a metric's values. + Metric *GoogleAnalyticsAdminV1alphaAccessOrderByMetricOrderBy `json:"metric,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Desc") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Desc") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessOrderBy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessOrderBy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessOrderByDimensionOrderBy: Sorts by +// dimension values. +type GoogleAnalyticsAdminV1alphaAccessOrderByDimensionOrderBy struct { + // DimensionName: A dimension name in the request to order by. + DimensionName string `json:"dimensionName,omitempty"` + + // OrderType: Controls the rule for dimension value ordering. + // + // Possible values: + // "ORDER_TYPE_UNSPECIFIED" - Unspecified. + // "ALPHANUMERIC" - Alphanumeric sort by Unicode code point. For + // example, "2" < "A" < "X" < "b" < "z". + // "CASE_INSENSITIVE_ALPHANUMERIC" - Case insensitive alphanumeric + // sort by lower case Unicode code point. For example, "2" < "A" < "b" < + // "X" < "z". + // "NUMERIC" - Dimension values are converted to numbers before + // sorting. For example in NUMERIC sort, "25" < "100", and in + // `ALPHANUMERIC` sort, "100" < "25". Non-numeric dimension values all + // have equal ordering value below all numeric values. + OrderType string `json:"orderType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DimensionName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DimensionName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessOrderByDimensionOrderBy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessOrderByDimensionOrderBy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessOrderByMetricOrderBy: Sorts by +// metric values. +type GoogleAnalyticsAdminV1alphaAccessOrderByMetricOrderBy struct { + // MetricName: A metric name in the request to order by. + MetricName string `json:"metricName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MetricName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MetricName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessOrderByMetricOrderBy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessOrderByMetricOrderBy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessQuota: Current state of all quotas +// for this Analytics property. If any quota for a property is +// exhausted, all requests to that property will return Resource +// Exhausted errors. +type GoogleAnalyticsAdminV1alphaAccessQuota struct { + // ConcurrentRequests: Properties can use up to 50 concurrent requests. + ConcurrentRequests *GoogleAnalyticsAdminV1alphaAccessQuotaStatus `json:"concurrentRequests,omitempty"` + + // ServerErrorsPerProjectPerHour: Properties and cloud project pairs can + // have up to 50 server errors per hour. + ServerErrorsPerProjectPerHour *GoogleAnalyticsAdminV1alphaAccessQuotaStatus `json:"serverErrorsPerProjectPerHour,omitempty"` + + // TokensPerDay: Properties can use 250,000 tokens per day. Most + // requests consume fewer than 10 tokens. + TokensPerDay *GoogleAnalyticsAdminV1alphaAccessQuotaStatus `json:"tokensPerDay,omitempty"` + + // TokensPerHour: Properties can use 50,000 tokens per hour. An API + // request consumes a single number of tokens, and that number is + // deducted from both the hourly and daily quotas. + TokensPerHour *GoogleAnalyticsAdminV1alphaAccessQuotaStatus `json:"tokensPerHour,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConcurrentRequests") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConcurrentRequests") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessQuota) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessQuota + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessQuotaStatus: Current state for a +// particular quota group. +type GoogleAnalyticsAdminV1alphaAccessQuotaStatus struct { + // Consumed: Quota consumed by this request. + Consumed int64 `json:"consumed,omitempty"` + + // Remaining: Quota remaining after this request. + Remaining int64 `json:"remaining,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Consumed") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Consumed") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessQuotaStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessQuotaStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessRow: Access report data for each +// row. +type GoogleAnalyticsAdminV1alphaAccessRow struct { + // DimensionValues: List of dimension values. These values are in the + // same order as specified in the request. + DimensionValues []*GoogleAnalyticsAdminV1alphaAccessDimensionValue `json:"dimensionValues,omitempty"` + + // MetricValues: List of metric values. These values are in the same + // order as specified in the request. + MetricValues []*GoogleAnalyticsAdminV1alphaAccessMetricValue `json:"metricValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DimensionValues") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DimensionValues") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessRow) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessRow + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaAccessStringFilter: The filter for +// strings. +type GoogleAnalyticsAdminV1alphaAccessStringFilter struct { + // CaseSensitive: If true, the string value is case sensitive. + CaseSensitive bool `json:"caseSensitive,omitempty"` + + // MatchType: The match type for this filter. + // + // Possible values: + // "MATCH_TYPE_UNSPECIFIED" - Unspecified + // "EXACT" - Exact match of the string value. + // "BEGINS_WITH" - Begins with the string value. + // "ENDS_WITH" - Ends with the string value. + // "CONTAINS" - Contains the string value. + // "FULL_REGEXP" - Full match for the regular expression with the + // string value. + // "PARTIAL_REGEXP" - Partial match for the regular expression with + // the string value. + MatchType string `json:"matchType,omitempty"` + + // Value: The string value used for the matching. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CaseSensitive") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CaseSensitive") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAccessStringFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAccessStringFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAnalyticsAdminV1alphaAccount: A resource message representing a // Google Analytics account. type GoogleAnalyticsAdminV1alphaAccount struct { @@ -2669,6 +3379,51 @@ func (s *GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAnalyticsAdminV1alphaNumericValue: To represent a number. +type GoogleAnalyticsAdminV1alphaNumericValue struct { + // DoubleValue: Double value + DoubleValue float64 `json:"doubleValue,omitempty"` + + // Int64Value: Integer value + Int64Value int64 `json:"int64Value,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "DoubleValue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DoubleValue") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaNumericValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaNumericValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleAnalyticsAdminV1alphaNumericValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleAnalyticsAdminV1alphaNumericValue + var s1 struct { + DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.DoubleValue = float64(s1.DoubleValue) + return nil +} + // GoogleAnalyticsAdminV1alphaProperty: A resource message representing // a Google Analytics GA4 property. type GoogleAnalyticsAdminV1alphaProperty struct { @@ -2922,6 +3677,155 @@ func (s *GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse) MarshalJSON( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAnalyticsAdminV1alphaRunAccessReportRequest: The request for a +// Data Access Record Report. +type GoogleAnalyticsAdminV1alphaRunAccessReportRequest struct { + // DateRanges: Date ranges of access records to read. If multiple date + // ranges are requested, each response row will contain a zero based + // date range index. If two date ranges overlap, the access records for + // the overlapping days is included in the response rows for both date + // ranges. Requests are allowed up to 2 date ranges. + DateRanges []*GoogleAnalyticsAdminV1alphaAccessDateRange `json:"dateRanges,omitempty"` + + // DimensionFilter: Dimension filters allow you to restrict report + // response to specific dimension values which match the filter. For + // example, filtering on access records of a single user. To learn more, + // see Fundamentals of Dimension Filters + // (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + DimensionFilter *GoogleAnalyticsAdminV1alphaAccessFilterExpression `json:"dimensionFilter,omitempty"` + + // Dimensions: The dimensions requested and displayed in the response. + // Requests are allowed up to 9 dimensions. + Dimensions []*GoogleAnalyticsAdminV1alphaAccessDimension `json:"dimensions,omitempty"` + + // Limit: The number of rows to return. If unspecified, 10,000 rows are + // returned. The API returns a maximum of 100,000 rows per request, no + // matter how many you ask for. `limit` must be positive. The API may + // return fewer rows than the requested `limit`, if there aren't as many + // remaining rows as the `limit`. For instance, there are fewer than 300 + // possible values for the dimension `country`, so when reporting on + // only `country`, you can't get more than 300 rows, even if you set + // `limit` to a higher value. To learn more about this pagination + // parameter, see Pagination + // (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + Limit int64 `json:"limit,omitempty,string"` + + // MetricFilter: Metric filters allow you to restrict report response to + // specific metric values which match the filter. Metric filters are + // applied after aggregating the report's rows, similar to SQL + // having-clause. Dimensions cannot be used in this filter. + MetricFilter *GoogleAnalyticsAdminV1alphaAccessFilterExpression `json:"metricFilter,omitempty"` + + // Metrics: The metrics requested and displayed in the response. + // Requests are allowed up to 10 metrics. + Metrics []*GoogleAnalyticsAdminV1alphaAccessMetric `json:"metrics,omitempty"` + + // Offset: The row count of the start row. The first row is counted as + // row 0. If offset is unspecified, it is treated as 0. If offset is + // zero, then this method will return the first page of results with + // `limit` entries. To learn more about this pagination parameter, see + // Pagination + // (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + Offset int64 `json:"offset,omitempty,string"` + + // OrderBys: Specifies how rows are ordered in the response. + OrderBys []*GoogleAnalyticsAdminV1alphaAccessOrderBy `json:"orderBys,omitempty"` + + // ReturnPropertyQuota: Toggles whether to return the current state of + // this Analytics Property's quota. Quota is returned in PropertyQuota + // (#PropertyQuota). + ReturnPropertyQuota bool `json:"returnPropertyQuota,omitempty"` + + // TimeZone: This request's time zone if specified. If unspecified, the + // property's time zone is used. The request's time zone is used to + // interpret the start & end dates of the report. Formatted as strings + // from the IANA Time Zone database (https://www.iana.org/time-zones); + // for example "America/New_York" or "Asia/Tokyo". + TimeZone string `json:"timeZone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DateRanges") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DateRanges") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaRunAccessReportRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaRunAccessReportRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaRunAccessReportResponse: The customized +// Data Access Record Report response. +type GoogleAnalyticsAdminV1alphaRunAccessReportResponse struct { + // DimensionHeaders: The header for a column in the report that + // corresponds to a specific dimension. The number of DimensionHeaders + // and ordering of DimensionHeaders matches the dimensions present in + // rows. + DimensionHeaders []*GoogleAnalyticsAdminV1alphaAccessDimensionHeader `json:"dimensionHeaders,omitempty"` + + // MetricHeaders: The header for a column in the report that corresponds + // to a specific metric. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + MetricHeaders []*GoogleAnalyticsAdminV1alphaAccessMetricHeader `json:"metricHeaders,omitempty"` + + // Quota: The quota state for this Analytics property including this + // request. + Quota *GoogleAnalyticsAdminV1alphaAccessQuota `json:"quota,omitempty"` + + // RowCount: The total number of rows in the query result. `rowCount` is + // independent of the number of rows returned in the response, the + // `limit` request parameter, and the `offset` request parameter. For + // example if a query returns 175 rows and includes `limit` of 50 in the + // API request, the response will contain `rowCount` of 175 but only 50 + // rows. To learn more about this pagination parameter, see Pagination + // (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + RowCount int64 `json:"rowCount,omitempty"` + + // Rows: Rows of dimension value combinations and metric values in the + // report. + Rows []*GoogleAnalyticsAdminV1alphaAccessRow `json:"rows,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DimensionHeaders") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DimensionHeaders") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaRunAccessReportResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaRunAccessReportResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest: Request // message for SearchChangeHistoryEvents RPC. type GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest struct { @@ -7391,6 +8295,164 @@ func (c *PropertiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalytics } +// method id "analyticsadmin.properties.runAccessReport": + +type PropertiesRunAccessReportCall struct { + s *Service + entity string + googleanalyticsadminv1alpharunaccessreportrequest *GoogleAnalyticsAdminV1alphaRunAccessReportRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RunAccessReport: Returns a customized report of data access records. +// The report provides records of each time a user reads Google +// Analytics reporting data. Access records are retained for up to 2 +// years. Data Access Reports can be requested for a property. The +// property must be in Google Analytics 360. This method is only +// available to Administrators. These data access records include GA4 UI +// Reporting, GA4 UI Explorations, GA4 Data API, and other products like +// Firebase & Admob that can retrieve data from Google Analytics through +// a linkage. These records don't include property configuration changes +// like adding a stream or changing a property's time zone. For +// configuration change history, see searchChangeHistoryEvents +// (https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). +// +// - entity: The Data Access Report is requested for this property. For +// example if "123" is your GA4 property ID, then entity should be +// "properties/123". +func (r *PropertiesService) RunAccessReport(entity string, googleanalyticsadminv1alpharunaccessreportrequest *GoogleAnalyticsAdminV1alphaRunAccessReportRequest) *PropertiesRunAccessReportCall { + c := &PropertiesRunAccessReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entity = entity + c.googleanalyticsadminv1alpharunaccessreportrequest = googleanalyticsadminv1alpharunaccessreportrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesRunAccessReportCall) Fields(s ...googleapi.Field) *PropertiesRunAccessReportCall { + 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 *PropertiesRunAccessReportCall) Context(ctx context.Context) *PropertiesRunAccessReportCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesRunAccessReportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesRunAccessReportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleanalyticsadminv1alpharunaccessreportrequest) + 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, "v1alpha/{+entity}:runAccessReport") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "entity": c.entity, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticsadmin.properties.runAccessReport" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaRunAccessReportResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaRunAccessReportResponse.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 *PropertiesRunAccessReportCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaRunAccessReportResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleAnalyticsAdminV1alphaRunAccessReportResponse{ + ServerResponse: googleapi.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 customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. The property must be in Google Analytics 360. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + // "flatPath": "v1alpha/properties/{propertiesId}:runAccessReport", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.runAccessReport", + // "parameterOrder": [ + // "entity" + // ], + // "parameters": { + // "entity": { + // "description": "The Data Access Report is requested for this property. For example if \"123\" is your GA4 property ID, then entity should be \"properties/123\".", + // "location": "path", + // "pattern": "^properties/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+entity}:runAccessReport", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaRunAccessReportRequest" + // }, + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaRunAccessReportResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" + // ] + // } + +} + // method id "analyticsadmin.properties.updateAttributionSettings": type PropertiesUpdateAttributionSettingsCall struct { diff --git a/api-list.json b/api-list.json index 6941d5837f4..702daf04cd6 100644 --- a/api-list.json +++ b/api-list.json @@ -801,7 +801,7 @@ "id": "blogger:v2", "name": "blogger", "version": "v2", - "title": "Blogger API v3", + "title": "Blogger API", "description": "The Blogger API provides access to posts, comments and pages of a Blogger blog.", "discoveryRestUrl": "https://blogger.googleapis.com/$discovery/rest?version=v2", "icons": { @@ -816,7 +816,7 @@ "id": "blogger:v3", "name": "blogger", "version": "v3", - "title": "Blogger API v3", + "title": "Blogger API", "description": "The Blogger API provides access to posts, comments and pages of a Blogger blog.", "discoveryRestUrl": "https://blogger.googleapis.com/$discovery/rest?version=v3", "icons": { diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index 9a117567e52..40941af1595 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -5777,6 +5777,174 @@ } } }, + "securityReports": { + "methods": { + "create": { + "description": "Submit a report request to be processed in the background. If the submission succeeds, the API returns a 200 status and an ID that refer to the report request. In addition to the HTTP status 200, the `state` of \"enqueued\" means that the request succeeded.", + "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/securityReports", + "httpMethod": "POST", + "id": "apigee.organizations.environments.securityReports.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource name. Must be of the form `organizations/{org}/environments/{env}`.", + "location": "path", + "pattern": "^organizations/[^/]+/environments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/securityReports", + "request": { + "$ref": "GoogleCloudApigeeV1SecurityReportQuery" + }, + "response": { + "$ref": "GoogleCloudApigeeV1SecurityReport" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get security report status If the query is still in progress, the `state` is set to \"running\" After the query has completed successfully, `state` is set to \"completed\"", + "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/securityReports/{securityReportsId}", + "httpMethod": "GET", + "id": "apigee.organizations.environments.securityReports.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the security report to get. Must be of the form `organizations/{org}/environments/{env}/securityReports/{reportId}`.", + "location": "path", + "pattern": "^organizations/[^/]+/environments/[^/]+/securityReports/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApigeeV1SecurityReport" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getResult": { + "description": "After the query is completed, use this API to retrieve the results as file. If the request succeeds, and there is a non-zero result set, the result is downloaded to the client as a zipped JSON file. The name of the downloaded file will be: OfflineQueryResult-.zip Example: `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip`", + "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/securityReports/{securityReportsId}/result", + "httpMethod": "GET", + "id": "apigee.organizations.environments.securityReports.getResult", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the security report result to get. Must be of the form `organizations/{org}/environments/{env}/securityReports/{reportId}/result`.", + "location": "path", + "pattern": "^organizations/[^/]+/environments/[^/]+/securityReports/[^/]+/result$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getResultView": { + "description": "After the query is completed, use this API to view the query result when result size is small.", + "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/securityReports/{securityReportsId}/resultView", + "httpMethod": "GET", + "id": "apigee.organizations.environments.securityReports.getResultView", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the security report result view to get. Must be of the form `organizations/{org}/environments/{env}/securityReports/{reportId}/resultView`.", + "location": "path", + "pattern": "^organizations/[^/]+/environments/[^/]+/securityReports/[^/]+/resultView$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApigeeV1SecurityReportResultView" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Return a list of Security Reports", + "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/securityReports", + "httpMethod": "GET", + "id": "apigee.organizations.environments.securityReports.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "dataset": { + "description": "Filter response list by dataset. Example: `api`, `mint`", + "location": "query", + "type": "string" + }, + "from": { + "description": "Filter response list by returning security reports that created after this date time. Time must be in ISO date-time format like '2011-12-03T10:15:30Z'.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of security report to return in the list response.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Token returned from the previous list response to fetch the next page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name. Must be of the form `organizations/{org}/environments/{env}`.", + "location": "path", + "pattern": "^organizations/[^/]+/environments/[^/]+$", + "required": true, + "type": "string" + }, + "status": { + "description": "Filter response list by security reports status.", + "location": "query", + "type": "string" + }, + "submittedBy": { + "description": "Filter response list by user who submitted queries.", + "location": "query", + "type": "string" + }, + "to": { + "description": "Filter response list by returning security reports that created before this date time. Time must be in ISO date-time format like '2011-12-03T10:16:30Z'.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/securityReports", + "response": { + "$ref": "GoogleCloudApigeeV1ListSecurityReportsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "sharedflows": { "resources": { "deployments": { @@ -6443,163 +6611,336 @@ } } }, - "hostStats": { - "methods": { - "get": { - "description": "Retrieve metrics grouped by dimensions in host level. The types of metrics you can retrieve include traffic, message counts, API call latency, response size, and cache hits and counts. Dimensions let you view metrics in meaningful groups. You can optionally pass dimensions as path parameters to the `stats` API. If dimensions are not specified, the metrics are computed on the entire set of data for the given time range.", - "flatPath": "v1/organizations/{organizationsId}/hostStats/{hostStatsId}", - "httpMethod": "GET", - "id": "apigee.organizations.hostStats.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "accuracy": { - "description": "No longer used by Apigee. Supported for backwards compatibility.", - "location": "query", - "type": "string" - }, - "envgroupHostname": { - "description": "Required. Hostname for which the interactive query will be executed.", - "location": "query", - "type": "string" - }, - "filter": { - "description": "Flag that enables drill-down on specific dimension values.", - "location": "query", - "type": "string" - }, - "limit": { - "description": "Maximum number of result items to return. The default and maximum value that can be returned is 14400.", - "location": "query", - "type": "string" - }, - "name": { - "description": "Required. Resource name for which the interactive query will be executed. Use the following format in your request: `organizations/{org}/hostStats/{dimensions}` Dimensions let you view metrics in meaningful groupings, such as `apiproxy`, `target_host`. The value of dimensions should be a comma-separated list as shown below `organizations/{org}/hostStats/apiproxy,request_verb`", - "location": "path", - "pattern": "^organizations/[^/]+/hostStats/.*$", - "required": true, - "type": "string" - }, - "offset": { - "description": "Offset value. Use `offset` with `limit` to enable pagination of results. For example, to display results 11-20, set limit to `10` and offset to `10`.", - "location": "query", - "type": "string" - }, - "realtime": { - "description": "No longer used by Apigee. Supported for backwards compatibility.", - "location": "query", - "type": "boolean" - }, - "select": { - "description": "Comma-separated list of metrics. For example: `sum(message_count),sum(error_count)`", - "location": "query", - "type": "string" - }, - "sort": { - "description": "Flag that specifies if the sort order should be ascending or descending. Valid values are `DESC` and `ASC`.", - "location": "query", - "type": "string" - }, - "sortby": { - "description": "Comma-separated list of columns to sort the final result.", - "location": "query", - "type": "string" - }, - "timeRange": { - "description": "Time interval for the interactive query. Time range is specified in GMT as `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59`", - "location": "query", - "type": "string" - }, - "timeUnit": { - "description": "Granularity of metrics returned. Valid values include: `second`, `minute`, `hour`, `day`, `week`, or `month`.", - "location": "query", - "type": "string" - }, - "topk": { - "description": "Top number of results to return. For example, to return the top 5 results, set `topk=5`.", - "location": "query", - "type": "string" - }, - "tsAscending": { - "description": "Flag that specifies whether to list timestamps in ascending (`true`) or descending (`false`) order. Apigee recommends that you set this value to `true` if you are using `sortby` with `sort=DESC`.", - "location": "query", - "type": "boolean" - }, - "tzo": { - "description": "Timezone offset value.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GoogleCloudApigeeV1Stats" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "instances": { + "hostSecurityReports": { "methods": { "create": { - "description": "Creates an Apigee runtime instance. The instance is accessible from the authorized network configured on the organization. **Note:** Not supported for Apigee hybrid.", - "flatPath": "v1/organizations/{organizationsId}/instances", + "description": "Submit a query at host level to be processed in the background. If the submission of the query succeeds, the API returns a 201 status and an ID that refer to the query. In addition to the HTTP status 201, the `state` of \"enqueued\" means that the request succeeded.", + "flatPath": "v1/organizations/{organizationsId}/hostSecurityReports", "httpMethod": "POST", - "id": "apigee.organizations.instances.create", + "id": "apigee.organizations.hostSecurityReports.create", "parameterOrder": [ "parent" ], "parameters": { "parent": { - "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}`.", + "description": "Required. The parent resource name. Must be of the form `organizations/{org}`.", "location": "path", "pattern": "^organizations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+parent}/instances", + "path": "v1/{+parent}/hostSecurityReports", "request": { - "$ref": "GoogleCloudApigeeV1Instance" + "$ref": "GoogleCloudApigeeV1SecurityReportQuery" }, "response": { - "$ref": "GoogleLongrunningOperation" + "$ref": "GoogleCloudApigeeV1SecurityReport" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "delete": { - "description": "Deletes an Apigee runtime instance. The instance stops serving requests and the runtime data is deleted. **Note:** Not supported for Apigee hybrid.", - "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}", - "httpMethod": "DELETE", - "id": "apigee.organizations.instances.delete", + "get": { + "description": "Get status of a query submitted at host level. If the query is still in progress, the `state` is set to \"running\" After the query has completed successfully, `state` is set to \"completed\"", + "flatPath": "v1/organizations/{organizationsId}/hostSecurityReports/{hostSecurityReportsId}", + "httpMethod": "GET", + "id": "apigee.organizations.hostSecurityReports.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. Name of the instance. Use the following structure in your request: `organizations/{org}/instances/{instance}`.", + "description": "Required. Name of the security report to get. Must be of the form `organizations/{org}/securityReports/{reportId}`.", "location": "path", - "pattern": "^organizations/[^/]+/instances/[^/]+$", + "pattern": "^organizations/[^/]+/hostSecurityReports/[^/]+$", "required": true, "type": "string" } }, "path": "v1/{+name}", "response": { - "$ref": "GoogleLongrunningOperation" + "$ref": "GoogleCloudApigeeV1SecurityReport" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "get": { - "description": "Gets the details for an Apigee runtime instance. **Note:** Not supported for Apigee hybrid.", - "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}", + "getResult": { + "description": "After the query is completed, use this API to retrieve the results. If the request succeeds, and there is a non-zero result set, the result is downloaded to the client as a zipped JSON file. The name of the downloaded file will be: OfflineQueryResult-.zip Example: `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip`", + "flatPath": "v1/organizations/{organizationsId}/hostSecurityReports/{hostSecurityReportsId}/result", + "httpMethod": "GET", + "id": "apigee.organizations.hostSecurityReports.getResult", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the security report result to get. Must be of the form `organizations/{org}/securityReports/{reportId}/result`.", + "location": "path", + "pattern": "^organizations/[^/]+/hostSecurityReports/[^/]+/result$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getResultView": { + "description": "After the query is completed, use this API to view the query result when result size is small.", + "flatPath": "v1/organizations/{organizationsId}/hostSecurityReports/{hostSecurityReportsId}/resultView", + "httpMethod": "GET", + "id": "apigee.organizations.hostSecurityReports.getResultView", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the security report result view to get. Must be of the form `organizations/{org}/securityReports/{reportId}/resultView`.", + "location": "path", + "pattern": "^organizations/[^/]+/hostSecurityReports/[^/]+/resultView$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApigeeV1SecurityReportResultView" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Return a list of Security Reports at host level.", + "flatPath": "v1/organizations/{organizationsId}/hostSecurityReports", + "httpMethod": "GET", + "id": "apigee.organizations.hostSecurityReports.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "dataset": { + "description": "Filter response list by dataset. Example: `api`, `mint`", + "location": "query", + "type": "string" + }, + "envgroupHostname": { + "description": "Required. Filter response list by hostname.", + "location": "query", + "type": "string" + }, + "from": { + "description": "Filter response list by returning security reports that created after this date time. Time must be in ISO date-time format like '2011-12-03T10:15:30Z'.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of security report to return in the list response.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Token returned from the previous list response to fetch the next page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name. Must be of the form `organizations/{org}`.", + "location": "path", + "pattern": "^organizations/[^/]+$", + "required": true, + "type": "string" + }, + "status": { + "description": "Filter response list by security report status.", + "location": "query", + "type": "string" + }, + "submittedBy": { + "description": "Filter response list by user who submitted queries.", + "location": "query", + "type": "string" + }, + "to": { + "description": "Filter response list by returning security reports that created before this date time. Time must be in ISO date-time format like '2011-12-03T10:16:30Z'.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/hostSecurityReports", + "response": { + "$ref": "GoogleCloudApigeeV1ListSecurityReportsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "hostStats": { + "methods": { + "get": { + "description": "Retrieve metrics grouped by dimensions in host level. The types of metrics you can retrieve include traffic, message counts, API call latency, response size, and cache hits and counts. Dimensions let you view metrics in meaningful groups. You can optionally pass dimensions as path parameters to the `stats` API. If dimensions are not specified, the metrics are computed on the entire set of data for the given time range.", + "flatPath": "v1/organizations/{organizationsId}/hostStats/{hostStatsId}", + "httpMethod": "GET", + "id": "apigee.organizations.hostStats.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "accuracy": { + "description": "No longer used by Apigee. Supported for backwards compatibility.", + "location": "query", + "type": "string" + }, + "envgroupHostname": { + "description": "Required. Hostname for which the interactive query will be executed.", + "location": "query", + "type": "string" + }, + "filter": { + "description": "Flag that enables drill-down on specific dimension values.", + "location": "query", + "type": "string" + }, + "limit": { + "description": "Maximum number of result items to return. The default and maximum value that can be returned is 14400.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Resource name for which the interactive query will be executed. Use the following format in your request: `organizations/{org}/hostStats/{dimensions}` Dimensions let you view metrics in meaningful groupings, such as `apiproxy`, `target_host`. The value of dimensions should be a comma-separated list as shown below `organizations/{org}/hostStats/apiproxy,request_verb`", + "location": "path", + "pattern": "^organizations/[^/]+/hostStats/.*$", + "required": true, + "type": "string" + }, + "offset": { + "description": "Offset value. Use `offset` with `limit` to enable pagination of results. For example, to display results 11-20, set limit to `10` and offset to `10`.", + "location": "query", + "type": "string" + }, + "realtime": { + "description": "No longer used by Apigee. Supported for backwards compatibility.", + "location": "query", + "type": "boolean" + }, + "select": { + "description": "Comma-separated list of metrics. For example: `sum(message_count),sum(error_count)`", + "location": "query", + "type": "string" + }, + "sort": { + "description": "Flag that specifies if the sort order should be ascending or descending. Valid values are `DESC` and `ASC`.", + "location": "query", + "type": "string" + }, + "sortby": { + "description": "Comma-separated list of columns to sort the final result.", + "location": "query", + "type": "string" + }, + "timeRange": { + "description": "Time interval for the interactive query. Time range is specified in GMT as `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59`", + "location": "query", + "type": "string" + }, + "timeUnit": { + "description": "Granularity of metrics returned. Valid values include: `second`, `minute`, `hour`, `day`, `week`, or `month`.", + "location": "query", + "type": "string" + }, + "topk": { + "description": "Top number of results to return. For example, to return the top 5 results, set `topk=5`.", + "location": "query", + "type": "string" + }, + "tsAscending": { + "description": "Flag that specifies whether to list timestamps in ascending (`true`) or descending (`false`) order. Apigee recommends that you set this value to `true` if you are using `sortby` with `sort=DESC`.", + "location": "query", + "type": "boolean" + }, + "tzo": { + "description": "Timezone offset value.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApigeeV1Stats" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "instances": { + "methods": { + "create": { + "description": "Creates an Apigee runtime instance. The instance is accessible from the authorized network configured on the organization. **Note:** Not supported for Apigee hybrid.", + "flatPath": "v1/organizations/{organizationsId}/instances", + "httpMethod": "POST", + "id": "apigee.organizations.instances.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}`.", + "location": "path", + "pattern": "^organizations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/instances", + "request": { + "$ref": "GoogleCloudApigeeV1Instance" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an Apigee runtime instance. The instance stops serving requests and the runtime data is deleted. **Note:** Not supported for Apigee hybrid.", + "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}", + "httpMethod": "DELETE", + "id": "apigee.organizations.instances.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the instance. Use the following structure in your request: `organizations/{org}/instances/{instance}`.", + "location": "path", + "pattern": "^organizations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details for an Apigee runtime instance. **Note:** Not supported for Apigee hybrid.", + "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}", "httpMethod": "GET", "id": "apigee.organizations.instances.get", "parameterOrder": [ @@ -7531,7 +7872,195 @@ } } }, - "sharedflows": { + "securityProfiles": { + "methods": { + "get": { + "description": "GetSecurityProfile gets the specified security profile. Returns NOT_FOUND if security profile is not present for the specified organization.", + "flatPath": "v1/organizations/{organizationsId}/securityProfiles/{securityProfilesId}", + "httpMethod": "GET", + "id": "apigee.organizations.securityProfiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Security profile in the following format: `organizations/{org}/securityProfiles/{profile}'. Profile may optionally contain revision ID. If revision ID is not provided, the response will contain latest revision by default. Example: organizations/testOrg/securityProfiles/testProfile@5", + "location": "path", + "pattern": "^organizations/[^/]+/securityProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApigeeV1SecurityProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "ListSecurityProfiles lists all the security profiles associated with the org including attached and unattached profiles.", + "flatPath": "v1/organizations/{organizationsId}/securityProfiles", + "httpMethod": "GET", + "id": "apigee.organizations.securityProfiles.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of profiles to return. The service may return fewer than this value. If unspecified, at most 50 profiles will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListSecurityProfiles` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. For a specific organization, list of all the security profiles. Format: `organizations/{org}`", + "location": "path", + "pattern": "^organizations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/securityProfiles", + "response": { + "$ref": "GoogleCloudApigeeV1ListSecurityProfilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "listRevisions": { + "description": "ListSecurityProfileRevisions lists all the revisions of the security profile.", + "flatPath": "v1/organizations/{organizationsId}/securityProfiles/{securityProfilesId}:listRevisions", + "httpMethod": "GET", + "id": "apigee.organizations.securityProfiles.listRevisions", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. For a specific profile, list all the revisions. Format: `organizations/{org}/securityProfiles/{profile}`", + "location": "path", + "pattern": "^organizations/[^/]+/securityProfiles/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of profile revisions to return. The service may return fewer than this value. If unspecified, at most 50 revisions will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListSecurityProfileRevisions` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}:listRevisions", + "response": { + "$ref": "GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "environments": { + "methods": { + "computeEnvironmentScores": { + "description": "ComputeEnvironmentScores calculates scores for requested time range for the specified security profile and environment.", + "flatPath": "v1/organizations/{organizationsId}/securityProfiles/{securityProfilesId}/environments/{environmentsId}:computeEnvironmentScores", + "httpMethod": "POST", + "id": "apigee.organizations.securityProfiles.environments.computeEnvironmentScores", + "parameterOrder": [ + "profileEnvironment" + ], + "parameters": { + "profileEnvironment": { + "description": "Required. Name of organization and environment and profile id for which score needs to be computed. Format: organizations/{org}/securityProfiles/{profile}/environments/{env}", + "location": "path", + "pattern": "^organizations/[^/]+/securityProfiles/[^/]+/environments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+profileEnvironment}:computeEnvironmentScores", + "request": { + "$ref": "GoogleCloudApigeeV1ComputeEnvironmentScoresRequest" + }, + "response": { + "$ref": "GoogleCloudApigeeV1ComputeEnvironmentScoresResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "CreateSecurityProfileEnvironmentAssociation creates profile environment association i.e. attaches environment to security profile.", + "flatPath": "v1/organizations/{organizationsId}/securityProfiles/{securityProfilesId}/environments", + "httpMethod": "POST", + "id": "apigee.organizations.securityProfiles.environments.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Name of organization and security profile ID. Format: organizations/{org}/securityProfiles/{profile}", + "location": "path", + "pattern": "^organizations/[^/]+/securityProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/environments", + "request": { + "$ref": "GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation" + }, + "response": { + "$ref": "GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "DeleteSecurityProfileEnvironmentAssociation removes profile environment association i.e. detaches environment from security profile.", + "flatPath": "v1/organizations/{organizationsId}/securityProfiles/{securityProfilesId}/environments/{environmentsId}", + "httpMethod": "DELETE", + "id": "apigee.organizations.securityProfiles.environments.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the environment attachment to delete. Format: organizations/{org}/securityProfiles/{profile}/environments/{env}", + "location": "path", + "pattern": "^organizations/[^/]+/securityProfiles/[^/]+/environments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "sharedflows": { "methods": { "create": { "description": "Uploads a ZIP-formatted shared flow configuration bundle to an organization. If the shared flow already exists, this creates a new revision of it. If the shared flow does not exist, this creates it. Once imported, the shared flow revision must be deployed before it can be accessed at runtime. The size limit of a shared flow bundle is 15 MB.", @@ -7986,7 +8515,7 @@ } } }, - "revision": "20220609", + "revision": "20220623", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -8116,6 +8645,10 @@ "$ref": "GoogleCloudApigeeV1AdvancedApiOpsConfig", "description": "Configuration for the Advanced API Ops add-on." }, + "apiSecurityConfig": { + "$ref": "GoogleCloudApigeeV1ApiSecurityConfig", + "description": "Configuration for the API Security add-on." + }, "connectorsPlatformConfig": { "$ref": "GoogleCloudApigeeV1ConnectorsPlatformConfig", "description": "Configuration for the Connectors Platform add-on." @@ -8581,6 +9114,23 @@ }, "type": "object" }, + "GoogleCloudApigeeV1ApiSecurityConfig": { + "description": "Configurations of the API Security add-on.", + "id": "GoogleCloudApigeeV1ApiSecurityConfig", + "properties": { + "enabled": { + "description": "Flag that specifies whether the API security add-on is enabled.", + "type": "boolean" + }, + "expiresAt": { + "description": "Output only. Time at which the API Security add-on expires in in milliseconds since epoch. If unspecified, the add-on will never expire.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudApigeeV1App": { "id": "GoogleCloudApigeeV1App", "properties": { @@ -9000,6 +9550,62 @@ }, "type": "object" }, + "GoogleCloudApigeeV1ComputeEnvironmentScoresRequest": { + "description": "Request for ComputeEnvironmentScores.", + "id": "GoogleCloudApigeeV1ComputeEnvironmentScoresRequest", + "properties": { + "filters": { + "description": "Optional. Filters are used to filter scored components. Return all the components if no filter is mentioned. Example: [{ \"scorePath\": \"/org@myorg/envgroup@myenvgroup/env@myenv/proxies/proxy@myproxy/source\" }, { \"scorePath\": \"/org@myorg/envgroup@myenvgroup/env@myenv/proxies/proxy@myproxy/target\", }] This will return components with path: \"/org@myorg/envgroup@myenvgroup/env@myenv/proxies/proxy@myproxy/source\" OR \"/org@myorg/envgroup@myenvgroup/env@myenv/proxies/proxy@myproxy/target\"", + "items": { + "$ref": "GoogleCloudApigeeV1ComputeEnvironmentScoresRequestFilter" + }, + "type": "array" + }, + "pageSize": { + "description": "Optional. The maximum number of subcomponents to be returned in a single page. The service may return fewer than this value. If unspecified, at most 100 subcomponents will be returned in a single page.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "timeRange": { + "$ref": "GoogleTypeInterval", + "description": "Required. Time range for score calculation. At most 14 days of scores will be returned." + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1ComputeEnvironmentScoresRequestFilter": { + "description": "Filter scores by component path. Used custom filter instead of AIP-160 as the use cases are highly constrained and predictable.", + "id": "GoogleCloudApigeeV1ComputeEnvironmentScoresRequestFilter", + "properties": { + "scorePath": { + "description": "Optional. Return scores for this component. Example: \"/org@myorg/envgroup@myenvgroup/env@myenv/proxies/proxy@myproxy/source\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1ComputeEnvironmentScoresResponse": { + "description": "Response for ComputeEnvironmentScores.", + "id": "GoogleCloudApigeeV1ComputeEnvironmentScoresResponse", + "properties": { + "nextPageToken": { + "description": "A page token, received from a previous `ComputeScore` call. Provide this to retrieve the subsequent page.", + "type": "string" + }, + "scores": { + "description": "List of scores. One score per day.", + "items": { + "$ref": "GoogleCloudApigeeV1Score" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudApigeeV1ConfigVersion": { "description": "Version of the API proxy configuration schema. Currently, only 4.0 is supported.", "id": "GoogleCloudApigeeV1ConfigVersion", @@ -11423,6 +12029,60 @@ }, "type": "object" }, + "GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse": { + "description": "Response for ListSecurityProfileRevisions.", + "id": "GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse", + "properties": { + "nextPageToken": { + "description": "A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "securityProfiles": { + "description": "List of security profile revisions. The revisions may be attached or unattached to any environment.", + "items": { + "$ref": "GoogleCloudApigeeV1SecurityProfile" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1ListSecurityProfilesResponse": { + "description": "Response for ListSecurityProfiles.", + "id": "GoogleCloudApigeeV1ListSecurityProfilesResponse", + "properties": { + "nextPageToken": { + "description": "A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "securityProfiles": { + "description": "List of security profiles in the organization. The profiles may be attached or unattached to any environment. This will return latest revision of each profile.", + "items": { + "$ref": "GoogleCloudApigeeV1SecurityProfile" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1ListSecurityReportsResponse": { + "description": "The response for SecurityReports.", + "id": "GoogleCloudApigeeV1ListSecurityReportsResponse", + "properties": { + "nextPageToken": { + "description": "If the number of security reports exceeded the page size requested, the token can be used to fetch the next page in a subsequent call. If the response is the last page and there are no more reports to return this field is left empty.", + "type": "string" + }, + "securityReports": { + "description": "The security reports belong to requested resource name.", + "items": { + "$ref": "GoogleCloudApigeeV1SecurityReport" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudApigeeV1ListSharedFlowsResponse": { "description": "To change this message, in the same CL add a change log in go/changing-api-proto-breaks-ui", "id": "GoogleCloudApigeeV1ListSharedFlowsResponse", @@ -12611,234 +13271,705 @@ "description": "The json content of the resource revision. Large specs should be sent individually via the spec field to avoid hitting request size limits.", "type": "string" }, - "replicas": { - "description": "The number of replicas that have successfully loaded this revision.", - "format": "int32", - "type": "integer" + "replicas": { + "description": "The number of replicas that have successfully loaded this revision.", + "format": "int32", + "type": "integer" + }, + "revisionId": { + "description": "The revision of the resource.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1RoutingRule": { + "id": "GoogleCloudApigeeV1RoutingRule", + "properties": { + "basepath": { + "description": "URI path prefix used to route to the specified environment. May contain one or more wildcards. For example, path segments consisting of a single `*` character will match any string.", + "type": "string" + }, + "envGroupRevision": { + "description": "The env group config revision_id when this rule was added or last updated. This value is set when the rule is created and will only update if the the environment_id changes. It is used to determine if the runtime is up to date with respect to this rule. This field is omitted from the IngressConfig unless the GetDeployedIngressConfig API is called with view=FULL.", + "format": "int64", + "type": "string" + }, + "environment": { + "description": "Name of an environment bound to the environment group in the following format: `organizations/{org}/environments/{env}`.", + "type": "string" + }, + "receiver": { + "description": "The resource name of the proxy revision that is receiving this basepath in the following format: `organizations/{org}/apis/{api}/revisions/{rev}`. This field is omitted from the IngressConfig unless the GetDeployedIngressConfig API is called with view=FULL.", + "type": "string" + }, + "updateTime": { + "description": "The unix timestamp when this rule was updated. This is updated whenever env_group_revision is updated. This field is omitted from the IngressConfig unless the GetDeployedIngressConfig API is called with view=FULL.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1RuntimeConfig": { + "description": "Runtime configuration for the organization. Response for GetRuntimeConfig.", + "id": "GoogleCloudApigeeV1RuntimeConfig", + "properties": { + "analyticsBucket": { + "description": "Cloud Storage bucket used for uploading Analytics records.", + "type": "string" + }, + "name": { + "description": "Name of the resource in the following format: `organizations/{org}/runtimeConfig`.", + "type": "string" + }, + "tenantProjectId": { + "description": "Output only. Tenant project ID associated with the Apigee organization. The tenant project is used to host Google-managed resources that are dedicated to this Apigee organization. Clients have limited access to resources within the tenant project used to support Apigee runtime instances. Access to the tenant project is managed using SetSyncAuthorization. It can be empty if the tenant project hasn't been created yet.", + "readOnly": true, + "type": "string" + }, + "traceBucket": { + "description": "Cloud Storage bucket used for uploading Trace records.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1RuntimeTraceConfig": { + "description": "NEXT ID: 8 RuntimeTraceConfig defines the configurations for distributed trace in an environment.", + "id": "GoogleCloudApigeeV1RuntimeTraceConfig", + "properties": { + "endpoint": { + "description": "Endpoint of the exporter.", + "type": "string" + }, + "exporter": { + "description": "Exporter that is used to view the distributed trace captured using OpenCensus. An exporter sends traces to any backend that is capable of consuming them. Recorded spans can be exported by registered exporters.", + "enum": [ + "EXPORTER_UNSPECIFIED", + "JAEGER", + "CLOUD_TRACE" + ], + "enumDescriptions": [ + "Exporter unspecified", + "Jaeger exporter", + "Cloudtrace exporter" + ], + "type": "string" + }, + "name": { + "description": "Name of the trace config in the following format: `organizations/{org}/environment/{env}/traceConfig`", + "type": "string" + }, + "overrides": { + "description": "List of trace configuration overrides for spicific API proxies.", + "items": { + "$ref": "GoogleCloudApigeeV1RuntimeTraceConfigOverride" + }, + "type": "array" + }, + "revisionCreateTime": { + "description": "The timestamp that the revision was created or updated.", + "format": "google-datetime", + "type": "string" + }, + "revisionId": { + "description": "Revision number which can be used by the runtime to detect if the trace config has changed between two versions.", + "type": "string" + }, + "samplingConfig": { + "$ref": "GoogleCloudApigeeV1RuntimeTraceSamplingConfig", + "description": "Trace configuration for all API proxies in an environment." + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1RuntimeTraceConfigOverride": { + "description": "NEXT ID: 7 Trace configuration override for a specific API proxy in an environment.", + "id": "GoogleCloudApigeeV1RuntimeTraceConfigOverride", + "properties": { + "apiProxy": { + "description": "Name of the API proxy that will have its trace configuration overridden following format: `organizations/{org}/apis/{api}`", + "type": "string" + }, + "name": { + "description": "Name of the trace config override in the following format: `organizations/{org}/environment/{env}/traceConfig/overrides/{override}`", + "type": "string" + }, + "revisionCreateTime": { + "description": "The timestamp that the revision was created or updated.", + "format": "google-datetime", + "type": "string" + }, + "revisionId": { + "description": "Revision number which can be used by the runtime to detect if the trace config override has changed between two versions.", + "type": "string" + }, + "samplingConfig": { + "$ref": "GoogleCloudApigeeV1RuntimeTraceSamplingConfig", + "description": "Trace configuration override for a specific API proxy in an environment." + }, + "uid": { + "description": "Unique ID for the configuration override. The ID will only change if the override is deleted and recreated. Corresponds to name's \"override\" field.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1RuntimeTraceSamplingConfig": { + "description": "NEXT ID: 3 RuntimeTraceSamplingConfig represents the detail settings of distributed tracing. Only the fields that are defined in the distributed trace configuration can be overridden using the distribute trace configuration override APIs.", + "id": "GoogleCloudApigeeV1RuntimeTraceSamplingConfig", + "properties": { + "sampler": { + "description": "Sampler of distributed tracing. OFF is the default value.", + "enum": [ + "SAMPLER_UNSPECIFIED", + "OFF", + "PROBABILITY" + ], + "enumDescriptions": [ + "Sampler unspecified.", + "OFF means distributed trace is disabled, or the sampling probability is 0.", + "PROBABILITY means traces are captured on a probability that defined by sampling_rate. The sampling rate is limited to 0 to 0.5 when this is set." + ], + "type": "string" + }, + "samplingRate": { + "description": "Field sampling rate. This value is only applicable when using the PROBABILITY sampler. The supported values are \u003e 0 and \u003c= 0.5.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1Schema": { + "description": "Response for Schema call", + "id": "GoogleCloudApigeeV1Schema", + "properties": { + "dimensions": { + "description": "List of schema fields grouped as dimensions.", + "items": { + "$ref": "GoogleCloudApigeeV1SchemaSchemaElement" + }, + "type": "array" + }, + "meta": { + "description": "Additional metadata associated with schema. This is a legacy field and usually consists of an empty array of strings.", + "items": { + "type": "string" + }, + "type": "array" + }, + "metrics": { + "description": "List of schema fields grouped as dimensions that can be used with an aggregate function such as `sum`, `avg`, `min`, and `max`.", + "items": { + "$ref": "GoogleCloudApigeeV1SchemaSchemaElement" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1SchemaSchemaElement": { + "description": "Message type for the schema element", + "id": "GoogleCloudApigeeV1SchemaSchemaElement", + "properties": { + "name": { + "description": "Name of the field.", + "type": "string" + }, + "properties": { + "$ref": "GoogleCloudApigeeV1SchemaSchemaProperty", + "description": "Properties for the schema field. For example: { \"createTime\": \"2016-02-26T10:23:09.592Z\", \"custom\": \"false\", \"type\": \"string\" }" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1SchemaSchemaProperty": { + "description": "Properties for the schema field.", + "id": "GoogleCloudApigeeV1SchemaSchemaProperty", + "properties": { + "createTime": { + "description": "Time the field was created in RFC3339 string form. For example: `2016-02-26T10:23:09.592Z`.", + "type": "string" + }, + "custom": { + "description": "Flag that specifies whether the field is standard in the dataset or a custom field created by the customer. `true` indicates that it is a custom field.", + "type": "string" + }, + "type": { + "description": "Data type of the field.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1Score": { + "description": "Represents Security Score.", + "id": "GoogleCloudApigeeV1Score", + "properties": { + "component": { + "$ref": "GoogleCloudApigeeV1ScoreComponent", + "description": "Component containing score, recommendations and actions." + }, + "subcomponents": { + "description": "List of all the drilldown score components.", + "items": { + "$ref": "GoogleCloudApigeeV1ScoreComponent" + }, + "type": "array" + }, + "timeRange": { + "$ref": "GoogleTypeInterval", + "description": "Start and end time for the score." + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1ScoreComponent": { + "description": "Component is an individual security element that is scored.", + "id": "GoogleCloudApigeeV1ScoreComponent", + "properties": { + "calculateTime": { + "description": "Time when score was calculated.", + "format": "google-datetime", + "type": "string" + }, + "dataCaptureTime": { + "description": "Time in the requested time period when data was last captured to compute the score.", + "format": "google-datetime", + "type": "string" + }, + "drilldownPaths": { + "description": "List of paths for next components.", + "items": { + "type": "string" + }, + "type": "array" + }, + "recommendations": { + "description": "List of recommendations to improve API security.", + "items": { + "$ref": "GoogleCloudApigeeV1ScoreComponentRecommendation" + }, + "type": "array" + }, + "score": { + "description": "Score for the component.", + "format": "int32", + "type": "integer" + }, + "scorePath": { + "description": "Path of the component. Example: /org@myorg/envgroup@myenvgroup/proxies/proxy@myproxy", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1ScoreComponentRecommendation": { + "description": "Recommendation based on security concerns and score.", + "id": "GoogleCloudApigeeV1ScoreComponentRecommendation", + "properties": { + "actions": { + "description": "Actions for the recommendation to improve the security score.", + "items": { + "$ref": "GoogleCloudApigeeV1ScoreComponentRecommendationAction" + }, + "type": "array" + }, + "description": { + "description": "Description of the recommendation.", + "type": "string" + }, + "impact": { + "description": "Potential impact of this recommendation on the overall score. This denotes how important this recommendation is to improve the score.", + "format": "int32", + "type": "integer" + }, + "title": { + "description": "Title represents recommendation title.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1ScoreComponentRecommendationAction": { + "description": "Action to improve security score.", + "id": "GoogleCloudApigeeV1ScoreComponentRecommendationAction", + "properties": { + "actionContext": { + "$ref": "GoogleCloudApigeeV1ScoreComponentRecommendationActionActionContext", + "description": "Action context for the action." + }, + "description": { + "description": "Description of the action.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1ScoreComponentRecommendationActionActionContext": { + "description": "Action context are all the relevant details for the action.", + "id": "GoogleCloudApigeeV1ScoreComponentRecommendationActionActionContext", + "properties": { + "documentationLink": { + "description": "Documentation link for the action.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1SecurityProfile": { + "description": "Represents a SecurityProfile resource.", + "id": "GoogleCloudApigeeV1SecurityProfile", + "properties": { + "displayName": { + "description": "Display name of the security profile.", + "type": "string" + }, + "environments": { + "description": "List of environments attached to security profile.", + "items": { + "$ref": "GoogleCloudApigeeV1SecurityProfileEnvironment" + }, + "type": "array" + }, + "maxScore": { + "description": "Output only. Maximum security score that can be generated by this profile.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "minScore": { + "description": "Output only. Minimum security score that can be generated by this profile.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "name": { + "description": "Immutable. Name of the security profile resource. Format: organizations/{org}/securityProfiles/{profile}", + "type": "string" + }, + "revisionCreateTime": { + "description": "Output only. The time when revision was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "revisionId": { + "description": "Output only. Revision ID of the security profile.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "revisionPublishTime": { + "description": "Output only. The time when revision was published. Once published, the security profile revision cannot be updated further and can be attached to environments.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "revisionUpdateTime": { + "description": "Output only. The time when revision was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "scoringConfigs": { + "description": "List of profile scoring configs in this revision.", + "items": { + "$ref": "GoogleCloudApigeeV1SecurityProfileScoringConfig" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1SecurityProfileEnvironment": { + "description": "Environment information of attached environments. Scoring an environment is enabled only if it is attached to a security profile.", + "id": "GoogleCloudApigeeV1SecurityProfileEnvironment", + "properties": { + "attachTime": { + "description": "Output only. Time at which environment was attached to the security profile.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "environment": { + "description": "Output only. Name of the environment.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation": { + "description": "Represents a SecurityProfileEnvironmentAssociation resource.", + "id": "GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation", + "properties": { + "attachTime": { + "description": "Output only. The time when environment was attached to the security profile.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. Name of the profile-environment association resource. Format: organizations/{org}/securityProfiles/{profile}/environments/{env}", + "type": "string" + }, + "securityProfileRevisionId": { + "description": "Revision ID of the security profile.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1SecurityProfileScoringConfig": { + "description": "Security configurations to manage scoring.", + "id": "GoogleCloudApigeeV1SecurityProfileScoringConfig", + "properties": { + "description": { + "description": "Description of the config.", + "type": "string" + }, + "scorePath": { + "description": "Path of the component config used for scoring.", + "type": "string" + }, + "title": { + "description": "Title of the config.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1SecurityReport": { + "description": "SecurityReport saves all the information about the created security report.", + "id": "GoogleCloudApigeeV1SecurityReport", + "properties": { + "created": { + "description": "Creation time of the query.", + "type": "string" + }, + "displayName": { + "description": "Display Name specified by the user.", + "type": "string" + }, + "envgroupHostname": { + "description": "Hostname is available only when query is executed at host level.", + "type": "string" + }, + "error": { + "description": "Error is set when query fails.", + "type": "string" + }, + "executionTime": { + "description": "ExecutionTime is available only after the query is completed.", + "type": "string" + }, + "queryParams": { + "$ref": "GoogleCloudApigeeV1SecurityReportMetadata", + "description": "Contains information like metrics, dimenstions etc of the Security Report." }, - "revisionId": { - "description": "The revision of the resource.", + "reportDefinitionId": { + "description": "Report Definition ID.", "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudApigeeV1RoutingRule": { - "id": "GoogleCloudApigeeV1RoutingRule", - "properties": { - "basepath": { - "description": "URI path prefix used to route to the specified environment. May contain one or more wildcards. For example, path segments consisting of a single `*` character will match any string.", + }, + "result": { + "$ref": "GoogleCloudApigeeV1SecurityReportResultMetadata", + "description": "Result is available only after the query is completed." + }, + "resultFileSize": { + "description": "ResultFileSize is available only after the query is completed.", "type": "string" }, - "envGroupRevision": { - "description": "The env group config revision_id when this rule was added or last updated. This value is set when the rule is created and will only update if the the environment_id changes. It is used to determine if the runtime is up to date with respect to this rule. This field is omitted from the IngressConfig unless the GetDeployedIngressConfig API is called with view=FULL.", + "resultRows": { + "description": "ResultRows is available only after the query is completed.", "format": "int64", "type": "string" }, - "environment": { - "description": "Name of an environment bound to the environment group in the following format: `organizations/{org}/environments/{env}`.", + "self": { + "description": "Self link of the query. Example: `/organizations/myorg/environments/myenv/securityReports/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd` or following format if query is running at host level: `/organizations/myorg/hostSecurityReports/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd`", "type": "string" }, - "receiver": { - "description": "The resource name of the proxy revision that is receiving this basepath in the following format: `organizations/{org}/apis/{api}/revisions/{rev}`. This field is omitted from the IngressConfig unless the GetDeployedIngressConfig API is called with view=FULL.", + "state": { + "description": "Query state could be \"enqueued\", \"running\", \"completed\", \"failed\".", "type": "string" }, - "updateTime": { - "description": "The unix timestamp when this rule was updated. This is updated whenever env_group_revision is updated. This field is omitted from the IngressConfig unless the GetDeployedIngressConfig API is called with view=FULL.", - "format": "google-datetime", + "updated": { + "description": "Output only. Last updated timestamp for the query.", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudApigeeV1RuntimeConfig": { - "description": "Runtime configuration for the organization. Response for GetRuntimeConfig.", - "id": "GoogleCloudApigeeV1RuntimeConfig", + "GoogleCloudApigeeV1SecurityReportMetadata": { + "description": "Metadata for the security report.", + "id": "GoogleCloudApigeeV1SecurityReportMetadata", "properties": { - "analyticsBucket": { - "description": "Cloud Storage bucket used for uploading Analytics records.", + "dimensions": { + "description": "Dimensions of the SecurityReport.", + "items": { + "type": "string" + }, + "type": "array" + }, + "endTimestamp": { + "description": "End timestamp of the query range.", + "format": "google-datetime", "type": "string" }, - "name": { - "description": "Name of the resource in the following format: `organizations/{org}/runtimeConfig`.", + "metrics": { + "description": "Metrics of the SecurityReport. Example: [\"name:bot_count,func:sum,alias:sum_bot_count\"]", + "items": { + "type": "string" + }, + "type": "array" + }, + "mimeType": { + "description": "MIME type / Output format.", "type": "string" }, - "tenantProjectId": { - "description": "Output only. Tenant project ID associated with the Apigee organization. The tenant project is used to host Google-managed resources that are dedicated to this Apigee organization. Clients have limited access to resources within the tenant project used to support Apigee runtime instances. Access to the tenant project is managed using SetSyncAuthorization. It can be empty if the tenant project hasn't been created yet.", - "readOnly": true, + "startTimestamp": { + "description": "Start timestamp of the query range.", + "format": "google-datetime", "type": "string" }, - "traceBucket": { - "description": "Cloud Storage bucket used for uploading Trace records.", + "timeUnit": { + "description": "Query GroupBy time unit. Example: \"seconds\", \"minute\", \"hour\"", "type": "string" } }, "type": "object" }, - "GoogleCloudApigeeV1RuntimeTraceConfig": { - "description": "NEXT ID: 8 RuntimeTraceConfig defines the configurations for distributed trace in an environment.", - "id": "GoogleCloudApigeeV1RuntimeTraceConfig", + "GoogleCloudApigeeV1SecurityReportQuery": { + "description": "Body structure when user makes a request to create a security report.", + "id": "GoogleCloudApigeeV1SecurityReportQuery", "properties": { - "endpoint": { - "description": "Endpoint of the exporter.", + "csvDelimiter": { + "description": "Delimiter used in the CSV file, if `outputFormat` is set to `csv`. Defaults to the `,` (comma) character. Supported delimiter characters include comma (`,`), pipe (`|`), and tab (`\\t`).", "type": "string" }, - "exporter": { - "description": "Exporter that is used to view the distributed trace captured using OpenCensus. An exporter sends traces to any backend that is capable of consuming them. Recorded spans can be exported by registered exporters.", - "enum": [ - "EXPORTER_UNSPECIFIED", - "JAEGER", - "CLOUD_TRACE" - ], - "enumDescriptions": [ - "Exporter unspecified", - "Jaeger exporter", - "Cloudtrace exporter" - ], + "dimensions": { + "description": "A list of dimensions. https://docs.apigee.com/api-platform/analytics/analytics-reference#dimensions", + "items": { + "type": "string" + }, + "type": "array" + }, + "displayName": { + "description": "Security Report display name which users can specify.", "type": "string" }, - "name": { - "description": "Name of the trace config in the following format: `organizations/{org}/environment/{env}/traceConfig`", + "envgroupHostname": { + "description": "Hostname needs to be specified if query intends to run at host level. This field is only allowed when query is submitted by CreateHostSecurityReport where analytics data will be grouped by organization and hostname.", "type": "string" }, - "overrides": { - "description": "List of trace configuration overrides for spicific API proxies.", + "filter": { + "description": "Boolean expression that can be used to filter data. Filter expressions can be combined using AND/OR terms and should be fully parenthesized to avoid ambiguity. See Analytics metrics, dimensions, and filters reference https://docs.apigee.com/api-platform/analytics/analytics-reference for more information on the fields available to filter on. For more information on the tokens that you use to build filter expressions, see Filter expression syntax. https://docs.apigee.com/api-platform/analytics/asynch-reports-api#filter-expression-syntax", + "type": "string" + }, + "groupByTimeUnit": { + "description": "Time unit used to group the result set. Valid values include: second, minute, hour, day, week, or month. If a query includes groupByTimeUnit, then the result is an aggregation based on the specified time unit and the resultant timestamp does not include milliseconds precision. If a query omits groupByTimeUnit, then the resultant timestamp includes milliseconds precision.", + "type": "string" + }, + "limit": { + "description": "Maximum number of rows that can be returned in the result.", + "format": "int32", + "type": "integer" + }, + "metrics": { + "description": "A list of Metrics.", "items": { - "$ref": "GoogleCloudApigeeV1RuntimeTraceConfigOverride" + "$ref": "GoogleCloudApigeeV1SecurityReportQueryMetric" }, "type": "array" }, - "revisionCreateTime": { - "description": "The timestamp that the revision was created or updated.", - "format": "google-datetime", + "mimeType": { + "description": "Valid values include: `csv` or `json`. Defaults to `json`. Note: Configure the delimiter for CSV output using the csvDelimiter property.", "type": "string" }, - "revisionId": { - "description": "Revision number which can be used by the runtime to detect if the trace config has changed between two versions.", + "reportDefinitionId": { + "description": "Report Definition ID.", "type": "string" }, - "samplingConfig": { - "$ref": "GoogleCloudApigeeV1RuntimeTraceSamplingConfig", - "description": "Trace configuration for all API proxies in an environment." + "timeRange": { + "description": "Required. Time range for the query. Can use the following predefined strings to specify the time range: `last60minutes` `last24hours` `last7days` Or, specify the timeRange as a structure describing start and end timestamps in the ISO format: yyyy-mm-ddThh:mm:ssZ. Example: \"timeRange\": { \"start\": \"2018-07-29T00:13:00Z\", \"end\": \"2018-08-01T00:18:00Z\" }", + "type": "any" } }, "type": "object" }, - "GoogleCloudApigeeV1RuntimeTraceConfigOverride": { - "description": "NEXT ID: 7 Trace configuration override for a specific API proxy in an environment.", - "id": "GoogleCloudApigeeV1RuntimeTraceConfigOverride", + "GoogleCloudApigeeV1SecurityReportQueryMetric": { + "description": "Metric of the Query", + "id": "GoogleCloudApigeeV1SecurityReportQueryMetric", "properties": { - "apiProxy": { - "description": "Name of the API proxy that will have its trace configuration overridden following format: `organizations/{org}/apis/{api}`", + "aggregationFunction": { + "description": "Aggregation function: avg, min, max, or sum.", "type": "string" }, - "name": { - "description": "Name of the trace config override in the following format: `organizations/{org}/environment/{env}/traceConfig/overrides/{override}`", + "alias": { + "description": "Alias for the metric. Alias will be used to replace metric name in query results.", "type": "string" }, - "revisionCreateTime": { - "description": "The timestamp that the revision was created or updated.", - "format": "google-datetime", + "name": { + "description": "Required. Metric name.", "type": "string" }, - "revisionId": { - "description": "Revision number which can be used by the runtime to detect if the trace config override has changed between two versions.", + "operator": { + "description": "One of `+`, `-`, `/`, `%`, `*`.", "type": "string" }, - "samplingConfig": { - "$ref": "GoogleCloudApigeeV1RuntimeTraceSamplingConfig", - "description": "Trace configuration override for a specific API proxy in an environment." - }, - "uid": { - "description": "Unique ID for the configuration override. The ID will only change if the override is deleted and recreated. Corresponds to name's \"override\" field.", + "value": { + "description": "Operand value should be provided when operator is set.", "type": "string" } }, "type": "object" }, - "GoogleCloudApigeeV1RuntimeTraceSamplingConfig": { - "description": "NEXT ID: 3 RuntimeTraceSamplingConfig represents the detail settings of distributed tracing. Only the fields that are defined in the distributed trace configuration can be overridden using the distribute trace configuration override APIs.", - "id": "GoogleCloudApigeeV1RuntimeTraceSamplingConfig", + "GoogleCloudApigeeV1SecurityReportResultMetadata": { + "description": "Contains informations about the security report results.", + "id": "GoogleCloudApigeeV1SecurityReportResultMetadata", "properties": { - "sampler": { - "description": "Sampler of distributed tracing. OFF is the default value.", - "enum": [ - "SAMPLER_UNSPECIFIED", - "OFF", - "PROBABILITY" - ], - "enumDescriptions": [ - "Sampler unspecified.", - "OFF means distributed trace is disabled, or the sampling probability is 0.", - "PROBABILITY means traces are captured on a probability that defined by sampling_rate. The sampling rate is limited to 0 to 0.5 when this is set." - ], + "expires": { + "description": "Output only. Expire_time is set to 7 days after report creation. Query result will be unaccessable after this time. Example: \"2021-05-04T13:38:52-07:00\"", + "readOnly": true, "type": "string" }, - "samplingRate": { - "description": "Field sampling rate. This value is only applicable when using the PROBABILITY sampler. The supported values are \u003e 0 and \u003c= 0.5.", - "format": "float", - "type": "number" + "self": { + "description": "Self link of the query results. Example: `/organizations/myorg/environments/myenv/securityReports/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd/result` or following format if query is running at host level: `/organizations/myorg/hostSecurityReports/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd/result`", + "type": "string" } }, "type": "object" }, - "GoogleCloudApigeeV1Schema": { - "description": "Response for Schema call", - "id": "GoogleCloudApigeeV1Schema", + "GoogleCloudApigeeV1SecurityReportResultView": { + "description": "The response for security report result view APIs.", + "id": "GoogleCloudApigeeV1SecurityReportResultView", "properties": { - "dimensions": { - "description": "List of schema fields grouped as dimensions.", - "items": { - "$ref": "GoogleCloudApigeeV1SchemaSchemaElement" - }, - "type": "array" + "code": { + "description": "Error code when there is a failure.", + "format": "int32", + "type": "integer" }, - "meta": { - "description": "Additional metadata associated with schema. This is a legacy field and usually consists of an empty array of strings.", - "items": { - "type": "string" - }, - "type": "array" + "error": { + "description": "Error message when there is a failure.", + "type": "string" }, - "metrics": { - "description": "List of schema fields grouped as dimensions that can be used with an aggregate function such as `sum`, `avg`, `min`, and `max`.", + "metadata": { + "$ref": "GoogleCloudApigeeV1SecurityReportMetadata", + "description": "Metadata contains information like metrics, dimenstions etc of the security report." + }, + "rows": { + "description": "Rows of security report result. Each row is a JSON object. Example: {sum(message_count): 1, developer_app: \"(not set)\",…}", "items": { - "$ref": "GoogleCloudApigeeV1SchemaSchemaElement" + "type": "any" }, "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudApigeeV1SchemaSchemaElement": { - "description": "Message type for the schema element", - "id": "GoogleCloudApigeeV1SchemaSchemaElement", - "properties": { - "name": { - "description": "Name of the field.", - "type": "string" - }, - "properties": { - "$ref": "GoogleCloudApigeeV1SchemaSchemaProperty", - "description": "Properties for the schema field. For example: { \"createTime\": \"2016-02-26T10:23:09.592Z\", \"custom\": \"false\", \"type\": \"string\" }" - } - }, - "type": "object" - }, - "GoogleCloudApigeeV1SchemaSchemaProperty": { - "description": "Properties for the schema field.", - "id": "GoogleCloudApigeeV1SchemaSchemaProperty", - "properties": { - "createTime": { - "description": "Time the field was created in RFC3339 string form. For example: `2016-02-26T10:23:09.592Z`.", - "type": "string" - }, - "custom": { - "description": "Flag that specifies whether the field is standard in the dataset or a custom field created by the customer. `true` indicates that it is a custom field.", - "type": "string" }, - "type": { - "description": "Data type of the field.", + "state": { + "description": "State of retrieving ResultView.", "type": "string" } }, @@ -13732,6 +14863,23 @@ }, "type": "object" }, + "GoogleTypeInterval": { + "description": "Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.", + "id": "GoogleTypeInterval", + "properties": { + "endTime": { + "description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleTypeMoney": { "description": "Represents an amount of money with its currency type.", "id": "GoogleTypeMoney", diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index 01a29c9b341..ddb24ad5269 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -177,12 +177,14 @@ func NewOrganizationsService(s *Service) *OrganizationsService { rs.Envgroups = NewOrganizationsEnvgroupsService(s) rs.Environments = NewOrganizationsEnvironmentsService(s) rs.HostQueries = NewOrganizationsHostQueriesService(s) + rs.HostSecurityReports = NewOrganizationsHostSecurityReportsService(s) rs.HostStats = NewOrganizationsHostStatsService(s) rs.Instances = NewOrganizationsInstancesService(s) rs.Keyvaluemaps = NewOrganizationsKeyvaluemapsService(s) rs.Operations = NewOrganizationsOperationsService(s) rs.OptimizedHostStats = NewOrganizationsOptimizedHostStatsService(s) rs.Reports = NewOrganizationsReportsService(s) + rs.SecurityProfiles = NewOrganizationsSecurityProfilesService(s) rs.Sharedflows = NewOrganizationsSharedflowsService(s) rs.Sites = NewOrganizationsSitesService(s) return rs @@ -213,6 +215,8 @@ type OrganizationsService struct { HostQueries *OrganizationsHostQueriesService + HostSecurityReports *OrganizationsHostSecurityReportsService + HostStats *OrganizationsHostStatsService Instances *OrganizationsInstancesService @@ -225,6 +229,8 @@ type OrganizationsService struct { Reports *OrganizationsReportsService + SecurityProfiles *OrganizationsSecurityProfilesService + Sharedflows *OrganizationsSharedflowsService Sites *OrganizationsSitesService @@ -529,6 +535,7 @@ func NewOrganizationsEnvironmentsService(s *Service) *OrganizationsEnvironmentsS rs.Queries = NewOrganizationsEnvironmentsQueriesService(s) rs.References = NewOrganizationsEnvironmentsReferencesService(s) rs.Resourcefiles = NewOrganizationsEnvironmentsResourcefilesService(s) + rs.SecurityReports = NewOrganizationsEnvironmentsSecurityReportsService(s) rs.Sharedflows = NewOrganizationsEnvironmentsSharedflowsService(s) rs.Stats = NewOrganizationsEnvironmentsStatsService(s) rs.Targetservers = NewOrganizationsEnvironmentsTargetserversService(s) @@ -563,6 +570,8 @@ type OrganizationsEnvironmentsService struct { Resourcefiles *OrganizationsEnvironmentsResourcefilesService + SecurityReports *OrganizationsEnvironmentsSecurityReportsService + Sharedflows *OrganizationsEnvironmentsSharedflowsService Stats *OrganizationsEnvironmentsStatsService @@ -788,6 +797,15 @@ type OrganizationsEnvironmentsResourcefilesService struct { s *Service } +func NewOrganizationsEnvironmentsSecurityReportsService(s *Service) *OrganizationsEnvironmentsSecurityReportsService { + rs := &OrganizationsEnvironmentsSecurityReportsService{s: s} + return rs +} + +type OrganizationsEnvironmentsSecurityReportsService struct { + s *Service +} + func NewOrganizationsEnvironmentsSharedflowsService(s *Service) *OrganizationsEnvironmentsSharedflowsService { rs := &OrganizationsEnvironmentsSharedflowsService{s: s} rs.Deployments = NewOrganizationsEnvironmentsSharedflowsDeploymentsService(s) @@ -869,6 +887,15 @@ type OrganizationsHostQueriesService struct { s *Service } +func NewOrganizationsHostSecurityReportsService(s *Service) *OrganizationsHostSecurityReportsService { + rs := &OrganizationsHostSecurityReportsService{s: s} + return rs +} + +type OrganizationsHostSecurityReportsService struct { + s *Service +} + func NewOrganizationsHostStatsService(s *Service) *OrganizationsHostStatsService { rs := &OrganizationsHostStatsService{s: s} return rs @@ -971,6 +998,27 @@ type OrganizationsReportsService struct { s *Service } +func NewOrganizationsSecurityProfilesService(s *Service) *OrganizationsSecurityProfilesService { + rs := &OrganizationsSecurityProfilesService{s: s} + rs.Environments = NewOrganizationsSecurityProfilesEnvironmentsService(s) + return rs +} + +type OrganizationsSecurityProfilesService struct { + s *Service + + Environments *OrganizationsSecurityProfilesEnvironmentsService +} + +func NewOrganizationsSecurityProfilesEnvironmentsService(s *Service) *OrganizationsSecurityProfilesEnvironmentsService { + rs := &OrganizationsSecurityProfilesEnvironmentsService{s: s} + return rs +} + +type OrganizationsSecurityProfilesEnvironmentsService struct { + s *Service +} + func NewOrganizationsSharedflowsService(s *Service) *OrganizationsSharedflowsService { rs := &OrganizationsSharedflowsService{s: s} rs.Deployments = NewOrganizationsSharedflowsDeploymentsService(s) @@ -1299,6 +1347,9 @@ type GoogleCloudApigeeV1AddonsConfig struct { // AdvancedApiOpsConfig: Configuration for the Advanced API Ops add-on. AdvancedApiOpsConfig *GoogleCloudApigeeV1AdvancedApiOpsConfig `json:"advancedApiOpsConfig,omitempty"` + // ApiSecurityConfig: Configuration for the API Security add-on. + ApiSecurityConfig *GoogleCloudApigeeV1ApiSecurityConfig `json:"apiSecurityConfig,omitempty"` + // ConnectorsPlatformConfig: Configuration for the Connectors Platform // add-on. ConnectorsPlatformConfig *GoogleCloudApigeeV1ConnectorsPlatformConfig `json:"connectorsPlatformConfig,omitempty"` @@ -1982,6 +2033,41 @@ func (s *GoogleCloudApigeeV1ApiResponseWrapper) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudApigeeV1ApiSecurityConfig: Configurations of the API +// Security add-on. +type GoogleCloudApigeeV1ApiSecurityConfig struct { + // Enabled: Flag that specifies whether the API security add-on is + // enabled. + Enabled bool `json:"enabled,omitempty"` + + // ExpiresAt: Output only. Time at which the API Security add-on expires + // in in milliseconds since epoch. If unspecified, the add-on will never + // expire. + ExpiresAt int64 `json:"expiresAt,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudApigeeV1ApiSecurityConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1ApiSecurityConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type GoogleCloudApigeeV1App struct { // ApiProducts: List of API products associated with the app. ApiProducts []*GoogleCloudApigeeV1ApiProductRef `json:"apiProducts,omitempty"` @@ -2568,6 +2654,129 @@ func (s *GoogleCloudApigeeV1CommonNameConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudApigeeV1ComputeEnvironmentScoresRequest: Request for +// ComputeEnvironmentScores. +type GoogleCloudApigeeV1ComputeEnvironmentScoresRequest struct { + // Filters: Optional. Filters are used to filter scored components. + // Return all the components if no filter is mentioned. Example: [{ + // "scorePath": + // "/org@myorg/envgroup@myenvgroup/env@myenv/proxies/proxy@myproxy/source + // " }, { "scorePath": + // "/org@myorg/envgroup@myenvgroup/env@myenv/proxies/proxy@myproxy/target + // ", }] This will return components with path: + // "/org@myorg/envgroup@myenvgroup/env@myenv/proxies/proxy@myproxy/source + // " OR + // "/org@myorg/envgroup@myenvgroup/env@myenv/proxies/proxy@myproxy/target + // " + Filters []*GoogleCloudApigeeV1ComputeEnvironmentScoresRequestFilter `json:"filters,omitempty"` + + // PageSize: Optional. The maximum number of subcomponents to be + // returned in a single page. The service may return fewer than this + // value. If unspecified, at most 100 subcomponents will be returned in + // a single page. + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: Optional. A token that can be sent as `page_token` to + // retrieve the next page. If this field is omitted, there are no + // subsequent pages. + PageToken string `json:"pageToken,omitempty"` + + // TimeRange: Required. Time range for score calculation. At most 14 + // days of scores will be returned. + TimeRange *GoogleTypeInterval `json:"timeRange,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Filters") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Filters") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudApigeeV1ComputeEnvironmentScoresRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1ComputeEnvironmentScoresRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApigeeV1ComputeEnvironmentScoresRequestFilter: Filter +// scores by component path. Used custom filter instead of AIP-160 as +// the use cases are highly constrained and predictable. +type GoogleCloudApigeeV1ComputeEnvironmentScoresRequestFilter struct { + // ScorePath: Optional. Return scores for this component. Example: + // "/org@myorg/envgroup@myenvgroup/env@myenv/proxies/proxy@myproxy/source + // " + ScorePath string `json:"scorePath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ScorePath") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ScorePath") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudApigeeV1ComputeEnvironmentScoresRequestFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1ComputeEnvironmentScoresRequestFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApigeeV1ComputeEnvironmentScoresResponse: Response for +// ComputeEnvironmentScores. +type GoogleCloudApigeeV1ComputeEnvironmentScoresResponse struct { + // NextPageToken: A page token, received from a previous `ComputeScore` + // call. Provide this to retrieve the subsequent page. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Scores: List of scores. One score per day. + Scores []*GoogleCloudApigeeV1Score `json:"scores,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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleCloudApigeeV1ComputeEnvironmentScoresResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1ComputeEnvironmentScoresResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudApigeeV1ConfigVersion: Version of the API proxy // configuration schema. Currently, only 4.0 is supported. type GoogleCloudApigeeV1ConfigVersion struct { @@ -6425,6 +6634,125 @@ func (s *GoogleCloudApigeeV1ListRatePlansResponse) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse: Response for +// ListSecurityProfileRevisions. +type GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse struct { + // NextPageToken: A token that can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SecurityProfiles: List of security profile revisions. The revisions + // may be attached or unattached to any environment. + SecurityProfiles []*GoogleCloudApigeeV1SecurityProfile `json:"securityProfiles,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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApigeeV1ListSecurityProfilesResponse: Response for +// ListSecurityProfiles. +type GoogleCloudApigeeV1ListSecurityProfilesResponse struct { + // NextPageToken: A token that can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SecurityProfiles: List of security profiles in the organization. The + // profiles may be attached or unattached to any environment. This will + // return latest revision of each profile. + SecurityProfiles []*GoogleCloudApigeeV1SecurityProfile `json:"securityProfiles,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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleCloudApigeeV1ListSecurityProfilesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1ListSecurityProfilesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApigeeV1ListSecurityReportsResponse: The response for +// SecurityReports. +type GoogleCloudApigeeV1ListSecurityReportsResponse struct { + // NextPageToken: If the number of security reports exceeded the page + // size requested, the token can be used to fetch the next page in a + // subsequent call. If the response is the last page and there are no + // more reports to return this field is left empty. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SecurityReports: The security reports belong to requested resource + // name. + SecurityReports []*GoogleCloudApigeeV1SecurityReport `json:"securityReports,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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleCloudApigeeV1ListSecurityReportsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1ListSecurityReportsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudApigeeV1ListSharedFlowsResponse: To change this message, // in the same CL add a change log in go/changing-api-proto-breaks-ui type GoogleCloudApigeeV1ListSharedFlowsResponse struct { @@ -8663,14 +8991,18 @@ func (s *GoogleCloudApigeeV1SchemaSchemaProperty) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GoogleCloudApigeeV1ServiceIssuersMapping struct { - // EmailIds: List of trusted issuer email ids. - EmailIds []string `json:"emailIds,omitempty"` +// GoogleCloudApigeeV1Score: Represents Security Score. +type GoogleCloudApigeeV1Score struct { + // Component: Component containing score, recommendations and actions. + Component *GoogleCloudApigeeV1ScoreComponent `json:"component,omitempty"` - // Service: String indicating the Apigee service name. - Service string `json:"service,omitempty"` + // Subcomponents: List of all the drilldown score components. + Subcomponents []*GoogleCloudApigeeV1ScoreComponent `json:"subcomponents,omitempty"` - // ForceSendFields is a list of field names (e.g. "EmailIds") to + // TimeRange: Start and end time for the score. + TimeRange *GoogleTypeInterval `json:"timeRange,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Component") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8678,7 +9010,7 @@ type GoogleCloudApigeeV1ServiceIssuersMapping struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EmailIds") to include in + // NullFields is a list of field names (e.g. "Component") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8687,23 +9019,36 @@ type GoogleCloudApigeeV1ServiceIssuersMapping struct { NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1ServiceIssuersMapping) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1ServiceIssuersMapping +func (s *GoogleCloudApigeeV1Score) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1Score raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudApigeeV1Session: Session carries the debug session id and -// its creation time. -type GoogleCloudApigeeV1Session struct { - // Id: The debug session ID. - Id string `json:"id,omitempty"` +// GoogleCloudApigeeV1ScoreComponent: Component is an individual +// security element that is scored. +type GoogleCloudApigeeV1ScoreComponent struct { + // CalculateTime: Time when score was calculated. + CalculateTime string `json:"calculateTime,omitempty"` - // TimestampMs: The first transaction creation timestamp in millisecond, - // recorded by UAP. - TimestampMs int64 `json:"timestampMs,omitempty,string"` + // DataCaptureTime: Time in the requested time period when data was last + // captured to compute the score. + DataCaptureTime string `json:"dataCaptureTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // DrilldownPaths: List of paths for next components. + DrilldownPaths []string `json:"drilldownPaths,omitempty"` + + // Recommendations: List of recommendations to improve API security. + Recommendations []*GoogleCloudApigeeV1ScoreComponentRecommendation `json:"recommendations,omitempty"` + + // Score: Score for the component. + Score int64 `json:"score,omitempty"` + + // ScorePath: Path of the component. Example: + // /org@myorg/envgroup@myenvgroup/proxies/proxy@myproxy + ScorePath string `json:"scorePath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CalculateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8711,8 +9056,49 @@ type GoogleCloudApigeeV1Session struct { // 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 + // NullFields is a list of field names (e.g. "CalculateTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudApigeeV1ScoreComponent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1ScoreComponent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApigeeV1ScoreComponentRecommendation: Recommendation based +// on security concerns and score. +type GoogleCloudApigeeV1ScoreComponentRecommendation struct { + // Actions: Actions for the recommendation to improve the security + // score. + Actions []*GoogleCloudApigeeV1ScoreComponentRecommendationAction `json:"actions,omitempty"` + + // Description: Description of the recommendation. + Description string `json:"description,omitempty"` + + // Impact: Potential impact of this recommendation on the overall score. + // This denotes how important this recommendation is to improve the + // score. + Impact int64 `json:"impact,omitempty"` + + // Title: Title represents recommendation title. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Actions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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. @@ -8720,18 +9106,22 @@ type GoogleCloudApigeeV1Session struct { NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1Session) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1Session +func (s *GoogleCloudApigeeV1ScoreComponentRecommendation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1ScoreComponentRecommendation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudApigeeV1SetAddonsRequest: Request for SetAddons. -type GoogleCloudApigeeV1SetAddonsRequest struct { - // AddonsConfig: Required. Add-on configurations. - AddonsConfig *GoogleCloudApigeeV1AddonsConfig `json:"addonsConfig,omitempty"` +// GoogleCloudApigeeV1ScoreComponentRecommendationAction: Action to +// improve security score. +type GoogleCloudApigeeV1ScoreComponentRecommendationAction struct { + // ActionContext: Action context for the action. + ActionContext *GoogleCloudApigeeV1ScoreComponentRecommendationActionActionContext `json:"actionContext,omitempty"` - // ForceSendFields is a list of field names (e.g. "AddonsConfig") to + // Description: Description of the action. + Description string `json:"description,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActionContext") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8739,7 +9129,7 @@ type GoogleCloudApigeeV1SetAddonsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddonsConfig") to include + // NullFields is a list of field names (e.g. "ActionContext") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -8748,40 +9138,27 @@ type GoogleCloudApigeeV1SetAddonsRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1SetAddonsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1SetAddonsRequest +func (s *GoogleCloudApigeeV1ScoreComponentRecommendationAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1ScoreComponentRecommendationAction raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudApigeeV1SharedFlow: The metadata describing a shared flow -type GoogleCloudApigeeV1SharedFlow struct { - // LatestRevisionId: The id of the most recently created revision for - // this shared flow. - LatestRevisionId string `json:"latestRevisionId,omitempty"` - - // MetaData: Metadata describing the shared flow. - MetaData *GoogleCloudApigeeV1EntityMetadata `json:"metaData,omitempty"` - - // Name: The ID of the shared flow. - Name string `json:"name,omitempty"` - - // Revision: A list of revisions of this shared flow. - Revision []string `json:"revision,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GoogleCloudApigeeV1ScoreComponentRecommendationActionActionContext: +// Action context are all the relevant details for the action. +type GoogleCloudApigeeV1ScoreComponentRecommendationActionActionContext struct { + // DocumentationLink: Documentation link for the action. + DocumentationLink string `json:"documentationLink,omitempty"` - // ForceSendFields is a list of field names (e.g. "LatestRevisionId") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "DocumentationLink") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LatestRevisionId") to + // NullFields is a list of field names (e.g. "DocumentationLink") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -8791,112 +9168,89 @@ type GoogleCloudApigeeV1SharedFlow struct { NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1SharedFlow) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1SharedFlow +func (s *GoogleCloudApigeeV1ScoreComponentRecommendationActionActionContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1ScoreComponentRecommendationActionActionContext raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudApigeeV1SharedFlowRevision: The metadata describing a -// shared flow revision. -type GoogleCloudApigeeV1SharedFlowRevision struct { - // ConfigurationVersion: The version of the configuration schema to - // which this shared flow conforms. The only supported value currently - // is majorVersion 4 and minorVersion 0. This setting may be used in the - // future to enable evolution of the shared flow format. - ConfigurationVersion *GoogleCloudApigeeV1ConfigVersion `json:"configurationVersion,omitempty"` - - // ContextInfo: A textual description of the shared flow revision. - ContextInfo string `json:"contextInfo,omitempty"` - - // CreatedAt: Time at which this shared flow revision was created, in - // milliseconds since epoch. - CreatedAt int64 `json:"createdAt,omitempty,string"` - - // Description: Description of the shared flow revision. - Description string `json:"description,omitempty"` - - // DisplayName: The human readable name of this shared flow. +// GoogleCloudApigeeV1SecurityProfile: Represents a SecurityProfile +// resource. +type GoogleCloudApigeeV1SecurityProfile struct { + // DisplayName: Display name of the security profile. DisplayName string `json:"displayName,omitempty"` - // EntityMetaDataAsProperties: A Key-Value map of metadata about this - // shared flow revision. - EntityMetaDataAsProperties map[string]string `json:"entityMetaDataAsProperties,omitempty"` + // Environments: List of environments attached to security profile. + Environments []*GoogleCloudApigeeV1SecurityProfileEnvironment `json:"environments,omitempty"` - // LastModifiedAt: Time at which this shared flow revision was most - // recently modified, in milliseconds since epoch. - LastModifiedAt int64 `json:"lastModifiedAt,omitempty,string"` + // MaxScore: Output only. Maximum security score that can be generated + // by this profile. + MaxScore int64 `json:"maxScore,omitempty"` - // Name: The resource ID of the parent shared flow. - Name string `json:"name,omitempty"` + // MinScore: Output only. Minimum security score that can be generated + // by this profile. + MinScore int64 `json:"minScore,omitempty"` - // Policies: A list of policy names included in this shared flow - // revision. - Policies []string `json:"policies,omitempty"` + // Name: Immutable. Name of the security profile resource. Format: + // organizations/{org}/securityProfiles/{profile} + Name string `json:"name,omitempty"` - // ResourceFiles: The resource files included in this shared flow - // revision. - ResourceFiles *GoogleCloudApigeeV1ResourceFiles `json:"resourceFiles,omitempty"` + // RevisionCreateTime: Output only. The time when revision was created. + RevisionCreateTime string `json:"revisionCreateTime,omitempty"` - // Resources: A list of the resources included in this shared flow - // revision formatted as "{type}://{name}". - Resources []string `json:"resources,omitempty"` + // RevisionId: Output only. Revision ID of the security profile. + RevisionId int64 `json:"revisionId,omitempty,string"` - // Revision: The resource ID of this revision. - Revision string `json:"revision,omitempty"` + // RevisionPublishTime: Output only. The time when revision was + // published. Once published, the security profile revision cannot be + // updated further and can be attached to environments. + RevisionPublishTime string `json:"revisionPublishTime,omitempty"` - // SharedFlows: A list of the shared flow names included in this shared - // flow revision. - SharedFlows []string `json:"sharedFlows,omitempty"` + // RevisionUpdateTime: Output only. The time when revision was updated. + RevisionUpdateTime string `json:"revisionUpdateTime,omitempty"` - // Type: The string "Application" - Type string `json:"type,omitempty"` + // ScoringConfigs: List of profile scoring configs in this revision. + ScoringConfigs []*GoogleCloudApigeeV1SecurityProfileScoringConfig `json:"scoringConfigs,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "ConfigurationVersion") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConfigurationVersion") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // 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 *GoogleCloudApigeeV1SharedFlowRevision) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1SharedFlowRevision +func (s *GoogleCloudApigeeV1SecurityProfile) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SecurityProfile raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudApigeeV1Stats: Encapsulates a `stats` response. -type GoogleCloudApigeeV1Stats struct { - // Environments: List of query results on the environment level. - Environments []*GoogleCloudApigeeV1StatsEnvironmentStats `json:"environments,omitempty"` - - // Hosts: List of query results grouped by host. - Hosts []*GoogleCloudApigeeV1StatsHostStats `json:"hosts,omitempty"` - - // MetaData: Metadata information. - MetaData *GoogleCloudApigeeV1Metadata `json:"metaData,omitempty"` +// GoogleCloudApigeeV1SecurityProfileEnvironment: Environment +// information of attached environments. Scoring an environment is +// enabled only if it is attached to a security profile. +type GoogleCloudApigeeV1SecurityProfileEnvironment struct { + // AttachTime: Output only. Time at which environment was attached to + // the security profile. + AttachTime string `json:"attachTime,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Environment: Output only. Name of the environment. + Environment string `json:"environment,omitempty"` - // ForceSendFields is a list of field names (e.g. "Environments") to + // ForceSendFields is a list of field names (e.g. "AttachTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8904,45 +9258,41 @@ type GoogleCloudApigeeV1Stats struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Environments") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AttachTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1Stats) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1Stats +func (s *GoogleCloudApigeeV1SecurityProfileEnvironment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SecurityProfileEnvironment raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudApigeeV1StatsEnvironmentStats: Encapsulates the -// environment wrapper: ``` "environments": [ { "metrics": [ { "name": -// "sum(message_count)", "values": [ "2.52056245E8" ] } ], "name": -// "prod" } ]``` -type GoogleCloudApigeeV1StatsEnvironmentStats struct { - // Dimensions: List of metrics grouped under dimensions. - Dimensions []*GoogleCloudApigeeV1DimensionMetric `json:"dimensions,omitempty"` - - // Metrics: In the final response, only one of the following fields will - // be present based on the dimensions provided. If no dimensions are - // provided, then only top-level metrics is provided. If dimensions are - // included, then there will be a top-level dimensions field under - // environments which will contain metrics values and the dimension - // name. Example: ``` "environments": [ { "dimensions": [ { "metrics": [ - // { "name": "sum(message_count)", "values": [ "2.14049521E8" ] } ], - // "name": "nit_proxy" } ], "name": "prod" } ]``` or ``"environments": - // [ { "metrics": [ { "name": "sum(message_count)", "values": [ - // "2.19026331E8" ] } ], "name": "prod" } ]``` List of metric values. - Metrics []*GoogleCloudApigeeV1Metric `json:"metrics,omitempty"` +// GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation: Represents +// a SecurityProfileEnvironmentAssociation resource. +type GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation struct { + // AttachTime: Output only. The time when environment was attached to + // the security profile. + AttachTime string `json:"attachTime,omitempty"` - // Name: Name of the environment. + // Name: Immutable. Name of the profile-environment association + // resource. Format: + // organizations/{org}/securityProfiles/{profile}/environments/{env} Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Dimensions") to + // SecurityProfileRevisionId: Revision ID of the security profile. + SecurityProfileRevisionId int64 `json:"securityProfileRevisionId,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AttachTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8950,7 +9300,7 @@ type GoogleCloudApigeeV1StatsEnvironmentStats struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Dimensions") to include in + // NullFields is a list of field names (e.g. "AttachTime") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8959,36 +9309,25 @@ type GoogleCloudApigeeV1StatsEnvironmentStats struct { NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1StatsEnvironmentStats) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1StatsEnvironmentStats +func (s *GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudApigeeV1StatsHostStats: Encapsulates the hostname wrapper: -// ``` "hosts": [ { "metrics": [ { "name": "sum(message_count)", -// "values": [ "2.52056245E8" ] } ], "name": "example.com" } ]``` -type GoogleCloudApigeeV1StatsHostStats struct { - // Dimensions: List of metrics grouped under dimensions. - Dimensions []*GoogleCloudApigeeV1DimensionMetric `json:"dimensions,omitempty"` +// GoogleCloudApigeeV1SecurityProfileScoringConfig: Security +// configurations to manage scoring. +type GoogleCloudApigeeV1SecurityProfileScoringConfig struct { + // Description: Description of the config. + Description string `json:"description,omitempty"` - // Metrics: In the final response, only one of the following fields will - // be present based on the dimensions provided. If no dimensions are - // provided, then only the top-level metrics are provided. If dimensions - // are included, then there will be a top-level dimensions field under - // hostnames which will contain metrics values and the dimension name. - // Example: ``` "hosts": [ { "dimensions": [ { "metrics": [ { "name": - // "sum(message_count)", "values": [ "2.14049521E8" ] } ], "name": - // "nit_proxy" } ], "name": "example.com" } ]``` OR ``"hosts": [ { - // "metrics": [ { "name": "sum(message_count)", "values": [ - // "2.19026331E8" ] } ], "name": "example.com" } ]``` List of metric - // values. - Metrics []*GoogleCloudApigeeV1Metric `json:"metrics,omitempty"` + // ScorePath: Path of the component config used for scoring. + ScorePath string `json:"scorePath,omitempty"` - // Name: Hostname used in query. - Name string `json:"name,omitempty"` + // Title: Title of the config. + Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. "Dimensions") to + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8996,34 +9335,79 @@ type GoogleCloudApigeeV1StatsHostStats struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Dimensions") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // 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 *GoogleCloudApigeeV1StatsHostStats) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1StatsHostStats +func (s *GoogleCloudApigeeV1SecurityProfileScoringConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SecurityProfileScoringConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudApigeeV1Subscription: Pub/Sub subscription of an -// environment. -type GoogleCloudApigeeV1Subscription struct { - // Name: Full name of the Pub/Sub subcription. Use the following - // structure in your request: `subscription - // "projects/foo/subscription/bar" - Name string `json:"name,omitempty"` +// GoogleCloudApigeeV1SecurityReport: SecurityReport saves all the +// information about the created security report. +type GoogleCloudApigeeV1SecurityReport struct { + // Created: Creation time of the query. + Created string `json:"created,omitempty"` + + // DisplayName: Display Name specified by the user. + DisplayName string `json:"displayName,omitempty"` + + // EnvgroupHostname: Hostname is available only when query is executed + // at host level. + EnvgroupHostname string `json:"envgroupHostname,omitempty"` + + // Error: Error is set when query fails. + Error string `json:"error,omitempty"` + + // ExecutionTime: ExecutionTime is available only after the query is + // completed. + ExecutionTime string `json:"executionTime,omitempty"` + + // QueryParams: Contains information like metrics, dimenstions etc of + // the Security Report. + QueryParams *GoogleCloudApigeeV1SecurityReportMetadata `json:"queryParams,omitempty"` + + // ReportDefinitionId: Report Definition ID. + ReportDefinitionId string `json:"reportDefinitionId,omitempty"` + + // Result: Result is available only after the query is completed. + Result *GoogleCloudApigeeV1SecurityReportResultMetadata `json:"result,omitempty"` + + // ResultFileSize: ResultFileSize is available only after the query is + // completed. + ResultFileSize string `json:"resultFileSize,omitempty"` + + // ResultRows: ResultRows is available only after the query is + // completed. + ResultRows int64 `json:"resultRows,omitempty,string"` + + // Self: Self link of the query. Example: + // `/organizations/myorg/environments/myenv/securityReports/9cfc0d85-0f30 + // -46d6-ae6f-318d0cb961bd` or following format if query is running at + // host level: + // `/organizations/myorg/hostSecurityReports/9cfc0d85-0f30-46d6-ae6f-318d + // 0cb961bd` + Self string `json:"self,omitempty"` + + // State: Query state could be "enqueued", "running", "completed", + // "failed". + State string `json:"state,omitempty"` + + // Updated: Output only. Last updated timestamp for the query. + Updated string `json:"updated,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Name") to + // ForceSendFields is a list of field names (e.g. "Created") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9031,8 +9415,8 @@ type GoogleCloudApigeeV1Subscription struct { // 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 + // NullFields is a list of field names (e.g. "Created") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -9040,43 +9424,36 @@ type GoogleCloudApigeeV1Subscription struct { NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1Subscription) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1Subscription +func (s *GoogleCloudApigeeV1SecurityReport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SecurityReport raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GoogleCloudApigeeV1SyncAuthorization struct { - // Etag: Entity tag (ETag) used for optimistic concurrency control as a - // way to help prevent simultaneous updates from overwriting each other. - // For example, when you call getSyncAuthorization - // (organizations/getSyncAuthorization) an ETag is returned in the - // response. Pass that ETag when calling the setSyncAuthorization - // (organizations/setSyncAuthorization) to ensure that you are updating - // the correct version. If you don't pass the ETag in the call to - // `setSyncAuthorization`, then the existing authorization is - // overwritten indiscriminately. **Note**: We strongly recommend that - // you use the ETag in the read-modify-write cycle to avoid race - // conditions. - Etag string `json:"etag,omitempty"` +// GoogleCloudApigeeV1SecurityReportMetadata: Metadata for the security +// report. +type GoogleCloudApigeeV1SecurityReportMetadata struct { + // Dimensions: Dimensions of the SecurityReport. + Dimensions []string `json:"dimensions,omitempty"` - // Identities: Required. Array of service accounts to grant access to - // control plane resources, each specified using the following format: - // `serviceAccount:` service-account-name. The service-account-name is - // formatted like an email address. For example: - // `my-synchronizer-manager-service_account@my_project_id.iam.gserviceacc - // ount.com` You might specify multiple service accounts, for example, - // if you have multiple environments and wish to assign a unique service - // account to each one. The service accounts must have **Apigee - // Synchronizer Manager** role. See also Create service accounts - // (https://cloud.google.com/apigee/docs/hybrid/latest/sa-about#create-the-service-accounts). - Identities []string `json:"identities,omitempty"` + // EndTimestamp: End timestamp of the query range. + EndTimestamp string `json:"endTimestamp,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Metrics: Metrics of the SecurityReport. Example: + // ["name:bot_count,func:sum,alias:sum_bot_count"] + Metrics []string `json:"metrics,omitempty"` - // ForceSendFields is a list of field names (e.g. "Etag") to + // MimeType: MIME type / Output format. + MimeType string `json:"mimeType,omitempty"` + + // StartTimestamp: Start timestamp of the query range. + StartTimestamp string `json:"startTimestamp,omitempty"` + + // TimeUnit: Query GroupBy time unit. Example: "seconds", "minute", + // "hour" + TimeUnit string `json:"timeUnit,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9084,8 +9461,8 @@ type GoogleCloudApigeeV1SyncAuthorization struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -9093,58 +9470,75 @@ type GoogleCloudApigeeV1SyncAuthorization struct { NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1SyncAuthorization) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1SyncAuthorization +func (s *GoogleCloudApigeeV1SecurityReportMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SecurityReportMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudApigeeV1TargetServer: TargetServer configuration. -// TargetServers are used to decouple a proxy's TargetEndpoint -// HTTPTargetConnections from concrete URLs for backend services. -type GoogleCloudApigeeV1TargetServer struct { - // Description: Optional. A human-readable description of this - // TargetServer. - Description string `json:"description,omitempty"` +// GoogleCloudApigeeV1SecurityReportQuery: Body structure when user +// makes a request to create a security report. +type GoogleCloudApigeeV1SecurityReportQuery struct { + // CsvDelimiter: Delimiter used in the CSV file, if `outputFormat` is + // set to `csv`. Defaults to the `,` (comma) character. Supported + // delimiter characters include comma (`,`), pipe (`|`), and tab (`\t`). + CsvDelimiter string `json:"csvDelimiter,omitempty"` - // Host: Required. The host name this target connects to. Value must be - // a valid hostname as described by RFC-1123. - Host string `json:"host,omitempty"` + // Dimensions: A list of dimensions. + // https://docs.apigee.com/api-platform/analytics/analytics-reference#dimensions + Dimensions []string `json:"dimensions,omitempty"` - // IsEnabled: Optional. Enabling/disabling a TargetServer is useful when - // TargetServers are used in load balancing configurations, and one or - // more TargetServers need to taken out of rotation periodically. - // Defaults to true. - IsEnabled bool `json:"isEnabled,omitempty"` + // DisplayName: Security Report display name which users can specify. + DisplayName string `json:"displayName,omitempty"` - // Name: Required. The resource id of this target server. Values must - // match the regular expression - Name string `json:"name,omitempty"` + // EnvgroupHostname: Hostname needs to be specified if query intends to + // run at host level. This field is only allowed when query is submitted + // by CreateHostSecurityReport where analytics data will be grouped by + // organization and hostname. + EnvgroupHostname string `json:"envgroupHostname,omitempty"` - // Port: Required. The port number this target connects to on the given - // host. Value must be between 1 and 65535, inclusive. - Port int64 `json:"port,omitempty"` + // Filter: Boolean expression that can be used to filter data. Filter + // expressions can be combined using AND/OR terms and should be fully + // parenthesized to avoid ambiguity. See Analytics metrics, dimensions, + // and filters reference + // https://docs.apigee.com/api-platform/analytics/analytics-reference + // for more information on the fields available to filter on. For more + // information on the tokens that you use to build filter expressions, + // see Filter expression syntax. + // https://docs.apigee.com/api-platform/analytics/asynch-reports-api#filter-expression-syntax + Filter string `json:"filter,omitempty"` - // Protocol: Immutable. The protocol used by this TargetServer. - // - // Possible values: - // "PROTOCOL_UNSPECIFIED" - UNSPECIFIED defaults to HTTP for backwards - // compatibility. - // "HTTP" - The TargetServer uses HTTP. - // "GRPC" - The TargetServer uses GRPC. - Protocol string `json:"protocol,omitempty"` + // GroupByTimeUnit: Time unit used to group the result set. Valid values + // include: second, minute, hour, day, week, or month. If a query + // includes groupByTimeUnit, then the result is an aggregation based on + // the specified time unit and the resultant timestamp does not include + // milliseconds precision. If a query omits groupByTimeUnit, then the + // resultant timestamp includes milliseconds precision. + GroupByTimeUnit string `json:"groupByTimeUnit,omitempty"` - // SSLInfo: Optional. Specifies TLS configuration info for this - // TargetServer. The JSON name is `sSLInfo` for legacy/backwards - // compatibility reasons -- Edge originally supported SSL, and the name - // is still used for TLS configuration. - SSLInfo *GoogleCloudApigeeV1TlsInfo `json:"sSLInfo,omitempty"` + // Limit: Maximum number of rows that can be returned in the result. + Limit int64 `json:"limit,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Metrics: A list of Metrics. + Metrics []*GoogleCloudApigeeV1SecurityReportQueryMetric `json:"metrics,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // MimeType: Valid values include: `csv` or `json`. Defaults to `json`. + // Note: Configure the delimiter for CSV output using the csvDelimiter + // property. + MimeType string `json:"mimeType,omitempty"` + + // ReportDefinitionId: Report Definition ID. + ReportDefinitionId string `json:"reportDefinitionId,omitempty"` + + // TimeRange: Required. Time range for the query. Can use the following + // predefined strings to specify the time range: `last60minutes` + // `last24hours` `last7days` Or, specify the timeRange as a structure + // describing start and end timestamps in the ISO format: + // yyyy-mm-ddThh:mm:ssZ. Example: "timeRange": { "start": + // "2018-07-29T00:13:00Z", "end": "2018-08-01T00:18:00Z" } + TimeRange interface{} `json:"timeRange,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CsvDelimiter") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9152,7 +9546,7 @@ type GoogleCloudApigeeV1TargetServer struct { // 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 + // NullFields is a list of field names (e.g. "CsvDelimiter") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -9161,41 +9555,71 @@ type GoogleCloudApigeeV1TargetServer struct { NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1TargetServer) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1TargetServer +func (s *GoogleCloudApigeeV1SecurityReportQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SecurityReportQuery raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GoogleCloudApigeeV1TargetServerConfig struct { - // Enabled: Whether the target server is enabled. An empty/omitted value - // for this field should be interpreted as true. - Enabled bool `json:"enabled,omitempty"` +// GoogleCloudApigeeV1SecurityReportQueryMetric: Metric of the Query +type GoogleCloudApigeeV1SecurityReportQueryMetric struct { + // AggregationFunction: Aggregation function: avg, min, max, or sum. + AggregationFunction string `json:"aggregationFunction,omitempty"` - // Host: Host name of the target server. - Host string `json:"host,omitempty"` + // Alias: Alias for the metric. Alias will be used to replace metric + // name in query results. + Alias string `json:"alias,omitempty"` - // Name: Target server revision name in the following format: - // `organizations/{org}/environments/{env}/targetservers/{targetserver}/r - // evisions/{rev}` + // Name: Required. Metric name. Name string `json:"name,omitempty"` - // Port: Port number for the target server. - Port int64 `json:"port,omitempty"` + // Operator: One of `+`, `-`, `/`, `%`, `*`. + Operator string `json:"operator,omitempty"` - // Protocol: The protocol used by this target server. - // - // Possible values: - // "PROTOCOL_UNSPECIFIED" - UNSPECIFIED defaults to HTTP for backwards - // compatibility. - // "HTTP" - The TargetServer uses HTTP. - // "GRPC" - The TargetServer uses GRPC. - Protocol string `json:"protocol,omitempty"` + // Value: Operand value should be provided when operator is set. + Value string `json:"value,omitempty"` - // TlsInfo: TLS settings for the target server. - TlsInfo *GoogleCloudApigeeV1TlsInfoConfig `json:"tlsInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. "AggregationFunction") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "Enabled") to + // NullFields is a list of field names (e.g. "AggregationFunction") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudApigeeV1SecurityReportQueryMetric) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SecurityReportQueryMetric + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApigeeV1SecurityReportResultMetadata: Contains +// informations about the security report results. +type GoogleCloudApigeeV1SecurityReportResultMetadata struct { + // Expires: Output only. Expire_time is set to 7 days after report + // creation. Query result will be unaccessable after this time. Example: + // "2021-05-04T13:38:52-07:00" + Expires string `json:"expires,omitempty"` + + // Self: Self link of the query results. Example: + // `/organizations/myorg/environments/myenv/securityReports/9cfc0d85-0f30 + // -46d6-ae6f-318d0cb961bd/result` or following format if query is + // running at host level: + // `/organizations/myorg/hostSecurityReports/9cfc0d85-0f30-46d6-ae6f-318d + // 0cb961bd/result` + Self string `json:"self,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Expires") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9203,7 +9627,7 @@ type GoogleCloudApigeeV1TargetServerConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in + // NullFields is a list of field names (e.g. "Expires") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9212,26 +9636,37 @@ type GoogleCloudApigeeV1TargetServerConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1TargetServerConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1TargetServerConfig +func (s *GoogleCloudApigeeV1SecurityReportResultMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SecurityReportResultMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudApigeeV1TestDatastoreResponse: The response for -// TestDatastore -type GoogleCloudApigeeV1TestDatastoreResponse struct { - // Error: Output only. Error message of test connection failure +// GoogleCloudApigeeV1SecurityReportResultView: The response for +// security report result view APIs. +type GoogleCloudApigeeV1SecurityReportResultView struct { + // Code: Error code when there is a failure. + Code int64 `json:"code,omitempty"` + + // Error: Error message when there is a failure. Error string `json:"error,omitempty"` - // State: Output only. It could be `completed` or `failed` + // Metadata: Metadata contains information like metrics, dimenstions etc + // of the security report. + Metadata *GoogleCloudApigeeV1SecurityReportMetadata `json:"metadata,omitempty"` + + // Rows: Rows of security report result. Each row is a JSON object. + // Example: {sum(message_count): 1, developer_app: "(not set)",…} + Rows []interface{} `json:"rows,omitempty"` + + // State: State of retrieving ResultView. 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. "Error") to + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9239,7 +9674,7 @@ type GoogleCloudApigeeV1TestDatastoreResponse struct { // 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 + // 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 @@ -9248,59 +9683,20 @@ type GoogleCloudApigeeV1TestDatastoreResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1TestDatastoreResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1TestDatastoreResponse +func (s *GoogleCloudApigeeV1SecurityReportResultView) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SecurityReportResultView raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudApigeeV1TlsInfo: TLS configuration information for virtual -// hosts and TargetServers. -type GoogleCloudApigeeV1TlsInfo struct { - // Ciphers: The SSL/TLS cipher suites to be used. For programmable - // proxies, it must be one of the cipher suite names listed in: - // http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#ciphersuites. - // For configurable proxies, it must follow the configuration specified - // in: - // https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#Cipher-suite-configuration. - // This setting has no effect for configurable proxies when negotiating - // TLS 1.3. - Ciphers []string `json:"ciphers,omitempty"` - - // ClientAuthEnabled: Optional. Enables two-way TLS. - ClientAuthEnabled bool `json:"clientAuthEnabled,omitempty"` - - // CommonName: The TLS Common Name of the certificate. - CommonName *GoogleCloudApigeeV1TlsInfoCommonName `json:"commonName,omitempty"` - - // Enabled: Required. Enables TLS. If false, neither one-way nor two-way - // TLS will be enabled. - Enabled bool `json:"enabled,omitempty"` - - // IgnoreValidationErrors: If true, Edge ignores TLS certificate errors. - // Valid when configuring TLS for target servers and target endpoints, - // and when configuring virtual hosts that use 2-way TLS. When used with - // a target endpoint/target server, if the backend system uses SNI and - // returns a cert with a subject Distinguished Name (DN) that does not - // match the hostname, there is no way to ignore the error and the - // connection fails. - IgnoreValidationErrors bool `json:"ignoreValidationErrors,omitempty"` - - // KeyAlias: Required if `client_auth_enabled` is true. The resource ID - // for the alias containing the private key and cert. - KeyAlias string `json:"keyAlias,omitempty"` - - // KeyStore: Required if `client_auth_enabled` is true. The resource ID - // of the keystore. - KeyStore string `json:"keyStore,omitempty"` - - // Protocols: The TLS versioins to be used. - Protocols []string `json:"protocols,omitempty"` +type GoogleCloudApigeeV1ServiceIssuersMapping struct { + // EmailIds: List of trusted issuer email ids. + EmailIds []string `json:"emailIds,omitempty"` - // TrustStore: The resource ID of the truststore. - TrustStore string `json:"trustStore,omitempty"` + // Service: String indicating the Apigee service name. + Service string `json:"service,omitempty"` - // ForceSendFields is a list of field names (e.g. "Ciphers") to + // ForceSendFields is a list of field names (e.g. "EmailIds") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9308,7 +9704,7 @@ type GoogleCloudApigeeV1TlsInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Ciphers") to include in + // NullFields is a list of field names (e.g. "EmailIds") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9317,21 +9713,23 @@ type GoogleCloudApigeeV1TlsInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1TlsInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1TlsInfo +func (s *GoogleCloudApigeeV1ServiceIssuersMapping) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1ServiceIssuersMapping raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GoogleCloudApigeeV1TlsInfoCommonName struct { - // Value: The TLS Common Name string of the certificate. - Value string `json:"value,omitempty"` +// GoogleCloudApigeeV1Session: Session carries the debug session id and +// its creation time. +type GoogleCloudApigeeV1Session struct { + // Id: The debug session ID. + Id string `json:"id,omitempty"` - // WildcardMatch: Indicates whether the cert should be matched against - // as a wildcard cert. - WildcardMatch bool `json:"wildcardMatch,omitempty"` + // TimestampMs: The first transaction creation timestamp in millisecond, + // recorded by UAP. + TimestampMs int64 `json:"timestampMs,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Value") to + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9339,7 +9737,7 @@ type GoogleCloudApigeeV1TlsInfoCommonName struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Value") to include in API + // 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 @@ -9348,51 +9746,18 @@ type GoogleCloudApigeeV1TlsInfoCommonName struct { NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1TlsInfoCommonName) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1TlsInfoCommonName +func (s *GoogleCloudApigeeV1Session) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1Session raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GoogleCloudApigeeV1TlsInfoConfig struct { - // Ciphers: List of ciphers that are granted access. - Ciphers []string `json:"ciphers,omitempty"` - - // ClientAuthEnabled: Flag that specifies whether client-side - // authentication is enabled for the target server. Enables two-way TLS. - ClientAuthEnabled bool `json:"clientAuthEnabled,omitempty"` - - // CommonName: Common name to validate the target server against. - CommonName *GoogleCloudApigeeV1CommonNameConfig `json:"commonName,omitempty"` - - // Enabled: Flag that specifies whether one-way TLS is enabled. Set to - // `true` to enable one-way TLS. - Enabled bool `json:"enabled,omitempty"` - - // IgnoreValidationErrors: Flag that specifies whether to ignore TLS - // certificate validation errors. Set to `true` to ignore errors. - IgnoreValidationErrors bool `json:"ignoreValidationErrors,omitempty"` - - // KeyAlias: Name of the alias used for client-side authentication in - // the following format: - // `organizations/{org}/environments/{env}/keystores/{keystore}/aliases/{ - // alias}` - KeyAlias string `json:"keyAlias,omitempty"` - - // KeyAliasReference: Reference name and alias pair to use for - // client-side authentication. - KeyAliasReference *GoogleCloudApigeeV1KeyAliasReference `json:"keyAliasReference,omitempty"` - - // Protocols: List of TLS protocols that are granted access. - Protocols []string `json:"protocols,omitempty"` - - // TrustStore: Name of the keystore or keystore reference containing - // trusted certificates for the server in the following format: - // `organizations/{org}/environments/{env}/keystores/{keystore}` or - // `organizations/{org}/environments/{env}/references/{reference}` - TrustStore string `json:"trustStore,omitempty"` +// GoogleCloudApigeeV1SetAddonsRequest: Request for SetAddons. +type GoogleCloudApigeeV1SetAddonsRequest struct { + // AddonsConfig: Required. Add-on configurations. + AddonsConfig *GoogleCloudApigeeV1AddonsConfig `json:"addonsConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "Ciphers") to + // ForceSendFields is a list of field names (e.g. "AddonsConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9400,49 +9765,41 @@ type GoogleCloudApigeeV1TlsInfoConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Ciphers") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AddonsConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1TlsInfoConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1TlsInfoConfig +func (s *GoogleCloudApigeeV1SetAddonsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SetAddonsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudApigeeV1TraceConfig: TraceConfig defines the -// configurations in an environment of distributed trace. -type GoogleCloudApigeeV1TraceConfig struct { - // Endpoint: Required. Endpoint of the exporter. - Endpoint string `json:"endpoint,omitempty"` +// GoogleCloudApigeeV1SharedFlow: The metadata describing a shared flow +type GoogleCloudApigeeV1SharedFlow struct { + // LatestRevisionId: The id of the most recently created revision for + // this shared flow. + LatestRevisionId string `json:"latestRevisionId,omitempty"` - // Exporter: Required. Exporter that is used to view the distributed - // trace captured using OpenCensus. An exporter sends traces to any - // backend that is capable of consuming them. Recorded spans can be - // exported by registered exporters. - // - // Possible values: - // "EXPORTER_UNSPECIFIED" - Exporter unspecified - // "JAEGER" - Jaeger exporter - // "CLOUD_TRACE" - Cloudtrace exporter - Exporter string `json:"exporter,omitempty"` + // MetaData: Metadata describing the shared flow. + MetaData *GoogleCloudApigeeV1EntityMetadata `json:"metaData,omitempty"` - // SamplingConfig: Distributed trace configuration for all API proxies - // in an environment. You can also override the configuration for a - // specific API proxy using the distributed trace configuration - // overrides API. - SamplingConfig *GoogleCloudApigeeV1TraceSamplingConfig `json:"samplingConfig,omitempty"` + // Name: The ID of the shared flow. + Name string `json:"name,omitempty"` + + // Revision: A list of revisions of this shared flow. + Revision []string `json:"revision,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Endpoint") to + // ForceSendFields is a list of field names (e.g. "LatestRevisionId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9450,40 +9807,122 @@ type GoogleCloudApigeeV1TraceConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Endpoint") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "LatestRevisionId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1TraceConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1TraceConfig +func (s *GoogleCloudApigeeV1SharedFlow) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SharedFlow raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudApigeeV1TraceConfigOverride: A representation of a -// configuration override. -type GoogleCloudApigeeV1TraceConfigOverride struct { - // ApiProxy: ID of the API proxy that will have its trace configuration - // overridden. - ApiProxy string `json:"apiProxy,omitempty"` +// GoogleCloudApigeeV1SharedFlowRevision: The metadata describing a +// shared flow revision. +type GoogleCloudApigeeV1SharedFlowRevision struct { + // ConfigurationVersion: The version of the configuration schema to + // which this shared flow conforms. The only supported value currently + // is majorVersion 4 and minorVersion 0. This setting may be used in the + // future to enable evolution of the shared flow format. + ConfigurationVersion *GoogleCloudApigeeV1ConfigVersion `json:"configurationVersion,omitempty"` - // Name: ID of the trace configuration override specified as a - // system-generated UUID. + // ContextInfo: A textual description of the shared flow revision. + ContextInfo string `json:"contextInfo,omitempty"` + + // CreatedAt: Time at which this shared flow revision was created, in + // milliseconds since epoch. + CreatedAt int64 `json:"createdAt,omitempty,string"` + + // Description: Description of the shared flow revision. + Description string `json:"description,omitempty"` + + // DisplayName: The human readable name of this shared flow. + DisplayName string `json:"displayName,omitempty"` + + // EntityMetaDataAsProperties: A Key-Value map of metadata about this + // shared flow revision. + EntityMetaDataAsProperties map[string]string `json:"entityMetaDataAsProperties,omitempty"` + + // LastModifiedAt: Time at which this shared flow revision was most + // recently modified, in milliseconds since epoch. + LastModifiedAt int64 `json:"lastModifiedAt,omitempty,string"` + + // Name: The resource ID of the parent shared flow. Name string `json:"name,omitempty"` - // SamplingConfig: Trace configuration to override. - SamplingConfig *GoogleCloudApigeeV1TraceSamplingConfig `json:"samplingConfig,omitempty"` + // Policies: A list of policy names included in this shared flow + // revision. + Policies []string `json:"policies,omitempty"` + + // ResourceFiles: The resource files included in this shared flow + // revision. + ResourceFiles *GoogleCloudApigeeV1ResourceFiles `json:"resourceFiles,omitempty"` + + // Resources: A list of the resources included in this shared flow + // revision formatted as "{type}://{name}". + Resources []string `json:"resources,omitempty"` + + // Revision: The resource ID of this revision. + Revision string `json:"revision,omitempty"` + + // SharedFlows: A list of the shared flow names included in this shared + // flow revision. + SharedFlows []string `json:"sharedFlows,omitempty"` + + // Type: The string "Application" + 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. "ApiProxy") to + // ForceSendFields is a list of field names (e.g. + // "ConfigurationVersion") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConfigurationVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudApigeeV1SharedFlowRevision) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SharedFlowRevision + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudApigeeV1Stats: Encapsulates a `stats` response. +type GoogleCloudApigeeV1Stats struct { + // Environments: List of query results on the environment level. + Environments []*GoogleCloudApigeeV1StatsEnvironmentStats `json:"environments,omitempty"` + + // Hosts: List of query results grouped by host. + Hosts []*GoogleCloudApigeeV1StatsHostStats `json:"hosts,omitempty"` + + // MetaData: Metadata information. + MetaData *GoogleCloudApigeeV1Metadata `json:"metaData,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Environments") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9491,43 +9930,45 @@ type GoogleCloudApigeeV1TraceConfigOverride struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApiProxy") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Environments") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1TraceConfigOverride) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1TraceConfigOverride +func (s *GoogleCloudApigeeV1Stats) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1Stats raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudApigeeV1TraceSamplingConfig: TraceSamplingConfig -// represents the detail settings of distributed tracing. Only the -// fields that are defined in the distributed trace configuration can be -// overridden using the distribute trace configuration override APIs. -type GoogleCloudApigeeV1TraceSamplingConfig struct { - // Sampler: Sampler of distributed tracing. OFF is the default value. - // - // Possible values: - // "SAMPLER_UNSPECIFIED" - Sampler unspecified. - // "OFF" - OFF means distributed trace is disabled, or the sampling - // probability is 0. - // "PROBABILITY" - PROBABILITY means traces are captured on a - // probability that defined by sampling_rate. The sampling rate is - // limited to 0 to 0.5 when this is set. - Sampler string `json:"sampler,omitempty"` +// GoogleCloudApigeeV1StatsEnvironmentStats: Encapsulates the +// environment wrapper: ``` "environments": [ { "metrics": [ { "name": +// "sum(message_count)", "values": [ "2.52056245E8" ] } ], "name": +// "prod" } ]``` +type GoogleCloudApigeeV1StatsEnvironmentStats struct { + // Dimensions: List of metrics grouped under dimensions. + Dimensions []*GoogleCloudApigeeV1DimensionMetric `json:"dimensions,omitempty"` - // SamplingRate: Field sampling rate. This value is only applicable when - // using the PROBABILITY sampler. The supported values are > 0 and <= - // 0.5. - SamplingRate float64 `json:"samplingRate,omitempty"` + // Metrics: In the final response, only one of the following fields will + // be present based on the dimensions provided. If no dimensions are + // provided, then only top-level metrics is provided. If dimensions are + // included, then there will be a top-level dimensions field under + // environments which will contain metrics values and the dimension + // name. Example: ``` "environments": [ { "dimensions": [ { "metrics": [ + // { "name": "sum(message_count)", "values": [ "2.14049521E8" ] } ], + // "name": "nit_proxy" } ], "name": "prod" } ]``` or ``"environments": + // [ { "metrics": [ { "name": "sum(message_count)", "values": [ + // "2.19026331E8" ] } ], "name": "prod" } ]``` List of metric values. + Metrics []*GoogleCloudApigeeV1Metric `json:"metrics,omitempty"` - // ForceSendFields is a list of field names (e.g. "Sampler") to + // Name: Name of the environment. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9535,7 +9976,7 @@ type GoogleCloudApigeeV1TraceSamplingConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Sampler") to include in + // NullFields is a list of field names (e.g. "Dimensions") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9544,135 +9985,36 @@ type GoogleCloudApigeeV1TraceSamplingConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1TraceSamplingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1TraceSamplingConfig +func (s *GoogleCloudApigeeV1StatsEnvironmentStats) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1StatsEnvironmentStats raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudApigeeV1TraceSamplingConfig) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudApigeeV1TraceSamplingConfig - var s1 struct { - SamplingRate gensupport.JSONFloat64 `json:"samplingRate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SamplingRate = float64(s1.SamplingRate) - return nil -} - -// GoogleCloudApigeeV1UpdateError: Details on why a resource update -// failed in the runtime. -type GoogleCloudApigeeV1UpdateError struct { - // Code: Status code. - // - // Possible values: - // "OK" - Not an error; returned on success HTTP Mapping: 200 OK - // "CANCELLED" - The operation was cancelled, typically by the caller. - // HTTP Mapping: 499 Client Closed Request - // "UNKNOWN" - Unknown error. For example, this error may be returned - // when a `Status` value received from another address space belongs to - // an error space that is not known in this address space. Also errors - // raised by APIs that do not return enough error information may be - // converted to this error. HTTP Mapping: 500 Internal Server Error - // "INVALID_ARGUMENT" - The client specified an invalid argument. Note - // that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` - // indicates arguments that are problematic regardless of the state of - // the system (e.g., a malformed file name). HTTP Mapping: 400 Bad - // Request - // "DEADLINE_EXCEEDED" - The deadline expired before the operation - // could complete. For operations that change the state of the system, - // this error may be returned even if the operation has completed - // successfully. For example, a successful response from a server could - // have been delayed long enough for the deadline to expire. HTTP - // Mapping: 504 Gateway Timeout - // "NOT_FOUND" - Some requested entity (e.g., file or directory) was - // not found. Note to server developers: if a request is denied for an - // entire class of users, such as gradual feature rollout or - // undocumented allowlist, `NOT_FOUND` may be used. If a request is - // denied for some users within a class of users, such as user-based - // access control, `PERMISSION_DENIED` must be used. HTTP Mapping: 404 - // Not Found - // "ALREADY_EXISTS" - The entity that a client attempted to create - // (e.g., file or directory) already exists. HTTP Mapping: 409 Conflict - // "PERMISSION_DENIED" - The caller does not have permission to - // execute the specified operation. `PERMISSION_DENIED` must not be used - // for rejections caused by exhausting some resource (use - // `RESOURCE_EXHAUSTED` instead for those errors). `PERMISSION_DENIED` - // must not be used if the caller can not be identified (use - // `UNAUTHENTICATED` instead for those errors). This error code does not - // imply the request is valid or the requested entity exists or - // satisfies other pre-conditions. HTTP Mapping: 403 Forbidden - // "UNAUTHENTICATED" - The request does not have valid authentication - // credentials for the operation. HTTP Mapping: 401 Unauthorized - // "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a - // per-user quota, or perhaps the entire file system is out of space. - // HTTP Mapping: 429 Too Many Requests - // "FAILED_PRECONDITION" - The operation was rejected because the - // system is not in a state required for the operation's execution. For - // example, the directory to be deleted is non-empty, an rmdir operation - // is applied to a non-directory, etc. Service implementors can use the - // following guidelines to decide between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can - // retry just the failing call. (b) Use `ABORTED` if the client should - // retry at a higher level. For example, when a client-specified - // test-and-set fails, indicating the client should restart a - // read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the - // client should not retry until the system state has been explicitly - // fixed. For example, if an "rmdir" fails because the directory is - // non-empty, `FAILED_PRECONDITION` should be returned since the client - // should not retry unless the files are deleted from the directory. - // HTTP Mapping: 400 Bad Request - // "ABORTED" - The operation was aborted, typically due to a - // concurrency issue such as a sequencer check failure or transaction - // abort. See the guidelines above for deciding between - // `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: - // 409 Conflict - // "OUT_OF_RANGE" - The operation was attempted past the valid range. - // E.g., seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, - // this error indicates a problem that may be fixed if the system state - // changes. For example, a 32-bit file system will generate - // `INVALID_ARGUMENT` if asked to read at an offset that is not in the - // range [0,2^32-1], but it will generate `OUT_OF_RANGE` if asked to - // read from an offset past the current file size. There is a fair bit - // of overlap between `FAILED_PRECONDITION` and `OUT_OF_RANGE`. We - // recommend using `OUT_OF_RANGE` (the more specific error) when it - // applies so that callers who are iterating through a space can easily - // look for an `OUT_OF_RANGE` error to detect when they are done. HTTP - // Mapping: 400 Bad Request - // "UNIMPLEMENTED" - The operation is not implemented or is not - // supported/enabled in this service. HTTP Mapping: 501 Not Implemented - // "INTERNAL" - Internal errors. This means that some invariants - // expected by the underlying system have been broken. This error code - // is reserved for serious errors. HTTP Mapping: 500 Internal Server - // Error - // "UNAVAILABLE" - The service is currently unavailable. This is most - // likely a transient condition, which can be corrected by retrying with - // a backoff. Note that it is not always safe to retry non-idempotent - // operations. See the guidelines above for deciding between - // `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: - // 503 Service Unavailable - // "DATA_LOSS" - Unrecoverable data loss or corruption. HTTP Mapping: - // 500 Internal Server Error - Code string `json:"code,omitempty"` - - // Message: User-friendly error message. - Message string `json:"message,omitempty"` +// GoogleCloudApigeeV1StatsHostStats: Encapsulates the hostname wrapper: +// ``` "hosts": [ { "metrics": [ { "name": "sum(message_count)", +// "values": [ "2.52056245E8" ] } ], "name": "example.com" } ]``` +type GoogleCloudApigeeV1StatsHostStats struct { + // Dimensions: List of metrics grouped under dimensions. + Dimensions []*GoogleCloudApigeeV1DimensionMetric `json:"dimensions,omitempty"` - // Resource: The sub resource specific to this error (e.g. a proxy - // deployed within the EnvironmentConfig). If empty the error refers to - // the top level resource. - Resource string `json:"resource,omitempty"` + // Metrics: In the final response, only one of the following fields will + // be present based on the dimensions provided. If no dimensions are + // provided, then only the top-level metrics are provided. If dimensions + // are included, then there will be a top-level dimensions field under + // hostnames which will contain metrics values and the dimension name. + // Example: ``` "hosts": [ { "dimensions": [ { "metrics": [ { "name": + // "sum(message_count)", "values": [ "2.14049521E8" ] } ], "name": + // "nit_proxy" } ], "name": "example.com" } ]``` OR ``"hosts": [ { + // "metrics": [ { "name": "sum(message_count)", "values": [ + // "2.19026331E8" ] } ], "name": "example.com" } ]``` List of metric + // values. + Metrics []*GoogleCloudApigeeV1Metric `json:"metrics,omitempty"` - // Type: A string that uniquely identifies the type of error. This - // provides a more reliable means to deduplicate errors across revisions - // and instances. - Type string `json:"type,omitempty"` + // Name: Hostname used in query. + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "Dimensions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9680,8 +10022,8 @@ type GoogleCloudApigeeV1UpdateError struct { // 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 + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -9689,86 +10031,25 @@ type GoogleCloudApigeeV1UpdateError struct { NullFields []string `json:"-"` } -func (s *GoogleCloudApigeeV1UpdateError) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudApigeeV1UpdateError - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1AuditConfig: Specifies the audit configuration for a -// service. The configuration determines which permission types are -// logged, and what identities, if any, are exempted from logging. An -// AuditConfig must have one or more AuditLogConfigs. If there are -// AuditConfigs for both `allServices` and a specific service, the union -// of the two AuditConfigs is used for that service: the log_types -// specified in each AuditConfig are enabled, and the exempted_members -// in each AuditLogConfig are exempted. Example Policy with multiple -// AuditConfigs: { "audit_configs": [ { "service": "allServices", -// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": -// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { -// "log_type": "ADMIN_READ" } ] }, { "service": -// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": -// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ -// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy -// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts -// `jose@example.com` from DATA_READ logging, and `aliya@example.com` -// from DATA_WRITE logging. -type GoogleIamV1AuditConfig struct { - // AuditLogConfigs: The configuration for logging of each type of - // permission. - AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"` - - // Service: Specifies a service that will be enabled for audit logging. - // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - // `allServices` is a special value that covers all services. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AuditLogConfigs") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1AuditConfig +func (s *GoogleCloudApigeeV1StatsHostStats) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1StatsHostStats raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1AuditLogConfig: Provides the configuration for logging a -// type of permissions. Example: { "audit_log_configs": [ { "log_type": -// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { -// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and -// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ -// logging. -type GoogleIamV1AuditLogConfig struct { - // ExemptedMembers: Specifies the identities that do not cause logging - // for this type of permission. Follows the same format of - // Binding.members. - ExemptedMembers []string `json:"exemptedMembers,omitempty"` +// GoogleCloudApigeeV1Subscription: Pub/Sub subscription of an +// environment. +type GoogleCloudApigeeV1Subscription struct { + // Name: Full name of the Pub/Sub subcription. Use the following + // structure in your request: `subscription + // "projects/foo/subscription/bar" + Name string `json:"name,omitempty"` - // LogType: The log type that this config enables. - // - // Possible values: - // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. - // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy - // "DATA_WRITE" - Data writes. Example: CloudSQL Users create - // "DATA_READ" - Data reads. Example: CloudSQL Users list - LogType string `json:"logType,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9776,74 +10057,52 @@ type GoogleIamV1AuditLogConfig struct { // 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 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 *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1AuditLogConfig +func (s *GoogleCloudApigeeV1Subscription) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1Subscription raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1Binding: Associates `members`, or principals, with a -// `role`. -type GoogleIamV1Binding struct { - // Condition: The condition that is associated with this binding. If the - // condition evaluates to `true`, then this binding applies to the - // current request. If the condition evaluates to `false`, then this - // binding does not apply to the current request. However, a different - // role binding might grant the same role to one or more of the - // principals in this binding. To learn which resources support - // conditions in their IAM policies, see the IAM documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Condition *GoogleTypeExpr `json:"condition,omitempty"` +type GoogleCloudApigeeV1SyncAuthorization struct { + // Etag: Entity tag (ETag) used for optimistic concurrency control as a + // way to help prevent simultaneous updates from overwriting each other. + // For example, when you call getSyncAuthorization + // (organizations/getSyncAuthorization) an ETag is returned in the + // response. Pass that ETag when calling the setSyncAuthorization + // (organizations/setSyncAuthorization) to ensure that you are updating + // the correct version. If you don't pass the ETag in the call to + // `setSyncAuthorization`, then the existing authorization is + // overwritten indiscriminately. **Note**: We strongly recommend that + // you use the ETag in the read-modify-write cycle to avoid race + // conditions. + Etag string `json:"etag,omitempty"` - // Members: Specifies the principals requesting access for a Google - // Cloud 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@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`. * `deleted:user:{emailid}?uid={uniqueid}`: An - // email address (plus unique identifier) representing a user that has - // been recently deleted. For example, - // `alice@example.com?uid=123456789012345678901`. If the user is - // recovered, this value reverts to `user:{emailid}` and the recovered - // user retains the role in the binding. * - // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address - // (plus unique identifier) representing a service account that has been - // recently deleted. For example, - // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - // If the service account is undeleted, this value reverts to - // `serviceAccount:{emailid}` and the undeleted service account retains - // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: - // An email address (plus unique identifier) representing a Google group - // that has been recently deleted. For example, - // `admins@example.com?uid=123456789012345678901`. If the group is - // recovered, this value reverts to `group:{emailid}` and the recovered - // group retains the role in the binding. * `domain:{domain}`: The G - // Suite domain (primary) that represents all the users of that domain. - // For example, `google.com` or `example.com`. - Members []string `json:"members,omitempty"` + // Identities: Required. Array of service accounts to grant access to + // control plane resources, each specified using the following format: + // `serviceAccount:` service-account-name. The service-account-name is + // formatted like an email address. For example: + // `my-synchronizer-manager-service_account@my_project_id.iam.gserviceacc + // ount.com` You might specify multiple service accounts, for example, + // if you have multiple environments and wish to assign a unique service + // account to each one. The service accounts must have **Apigee + // Synchronizer Manager** role. See also Create service accounts + // (https://cloud.google.com/apigee/docs/hybrid/latest/sa-about#create-the-service-accounts). + Identities []string `json:"identities,omitempty"` - // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - Role string `json:"role,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Condition") to + // ForceSendFields is a list of field names (e.g. "Etag") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9851,8 +10110,8 @@ type GoogleIamV1Binding struct { // 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 + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -9860,100 +10119,58 @@ type GoogleIamV1Binding struct { NullFields []string `json:"-"` } -func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Binding +func (s *GoogleCloudApigeeV1SyncAuthorization) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1SyncAuthorization raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1Policy: An Identity and Access Management (IAM) policy, -// which specifies access controls for Google Cloud resources. A -// `Policy` is a collection of `bindings`. A `binding` binds one or more -// `members`, or principals, to a single `role`. Principals can be user -// accounts, service accounts, Google groups, and domains (such as G -// Suite). A `role` is a named list of permissions; each `role` can be -// an IAM predefined role or a user-created custom role. For some types -// of Google Cloud resources, a `binding` can also specify a -// `condition`, which is a logical expression that allows access to a -// resource only if the expression evaluates to `true`. A condition can -// add constraints based on attributes of the request, the resource, or -// both. To learn which resources support conditions in their IAM -// policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": -// "roles/resourcemanager.organizationAdmin", "members": [ -// "user:mike@example.com", "group:admins@example.com", -// "domain:google.com", -// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { -// "role": "roles/resourcemanager.organizationViewer", "members": [ -// "user:eve@example.com" ], "condition": { "title": "expirable access", -// "description": "Does not grant access after Sep 2020", "expression": -// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - -// serviceAccount:my-project-id@appspot.gserviceaccount.com role: -// roles/resourcemanager.organizationAdmin - members: - -// user:eve@example.com role: roles/resourcemanager.organizationViewer -// condition: title: expirable access description: Does not grant access -// after Sep 2020 expression: request.time < -// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). -type GoogleIamV1Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this - // policy. - AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"` +// GoogleCloudApigeeV1TargetServer: TargetServer configuration. +// TargetServers are used to decouple a proxy's TargetEndpoint +// HTTPTargetConnections from concrete URLs for backend services. +type GoogleCloudApigeeV1TargetServer struct { + // Description: Optional. A human-readable description of this + // TargetServer. + Description string `json:"description,omitempty"` - // Bindings: Associates a list of `members`, or principals, with a - // `role`. Optionally, may specify a `condition` that determines how and - // when the `bindings` are applied. Each of the `bindings` must contain - // at least one principal. The `bindings` in a `Policy` can refer to up - // to 1,500 principals; up to 250 of these principals can be Google - // groups. Each occurrence of a principal counts towards these limits. - // For example, if the `bindings` grant 50 different roles to - // `user:alice@example.com`, and not to any other principal, then you - // can add another 1,450 principals to the `bindings` in the `Policy`. - Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"` + // Host: Required. The host name this target connects to. Value must be + // a valid hostname as described by RFC-1123. + Host string `json:"host,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. **Important:** If you use IAM - // Conditions, you must include the `etag` field whenever you call - // `setIamPolicy`. If you omit this field, then IAM allows you to - // overwrite a version `3` policy with a version `1` policy, and all of - // the conditions in the version `3` policy are lost. - Etag string `json:"etag,omitempty"` + // IsEnabled: Optional. Enabling/disabling a TargetServer is useful when + // TargetServers are used in load balancing configurations, and one or + // more TargetServers need to taken out of rotation periodically. + // Defaults to true. + IsEnabled bool `json:"isEnabled,omitempty"` - // Version: Specifies the format of the policy. Valid values are `0`, - // `1`, and `3`. Requests that specify an invalid value are rejected. - // Any operation that affects conditional role bindings must specify - // version `3`. This requirement applies to the following operations: * - // Getting a policy that includes a conditional role binding * Adding a - // conditional role binding to a policy * Changing a conditional role - // binding in a policy * Removing any role binding, with or without a - // condition, from a policy that includes conditions **Important:** If - // you use IAM Conditions, you must include the `etag` field whenever - // you call `setIamPolicy`. If you omit this field, then IAM allows you - // to overwrite a version `3` policy with a version `1` policy, and all - // of the conditions in the version `3` policy are lost. If a policy - // does not include any conditions, operations on that policy may - // specify any valid version or leave the field unset. To learn which - // resources support conditions in their IAM policies, see the IAM - // documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Version int64 `json:"version,omitempty"` + // Name: Required. The resource id of this target server. Values must + // match the regular expression + Name string `json:"name,omitempty"` + + // Port: Required. The port number this target connects to on the given + // host. Value must be between 1 and 65535, inclusive. + Port int64 `json:"port,omitempty"` + + // Protocol: Immutable. The protocol used by this TargetServer. + // + // Possible values: + // "PROTOCOL_UNSPECIFIED" - UNSPECIFIED defaults to HTTP for backwards + // compatibility. + // "HTTP" - The TargetServer uses HTTP. + // "GRPC" - The TargetServer uses GRPC. + Protocol string `json:"protocol,omitempty"` + + // SSLInfo: Optional. Specifies TLS configuration info for this + // TargetServer. The JSON name is `sSLInfo` for legacy/backwards + // compatibility reasons -- Edge originally supported SSL, and the name + // is still used for TLS configuration. + SSLInfo *GoogleCloudApigeeV1TlsInfo `json:"sSLInfo,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 + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9961,7 +10178,7 @@ type GoogleIamV1Policy struct { // 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 + // 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 @@ -9970,28 +10187,41 @@ type GoogleIamV1Policy struct { NullFields []string `json:"-"` } -func (s *GoogleIamV1Policy) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Policy +func (s *GoogleCloudApigeeV1TargetServer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1TargetServer raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1SetIamPolicyRequest: Request message for `SetIamPolicy` -// method. -type GoogleIamV1SetIamPolicyRequest struct { - // Policy: REQUIRED: The complete policy to be applied to the - // `resource`. The size of the policy is limited to a few 10s of KB. An - // empty policy is a valid policy but certain Google Cloud services - // (such as Projects) might reject them. - Policy *GoogleIamV1Policy `json:"policy,omitempty"` +type GoogleCloudApigeeV1TargetServerConfig struct { + // Enabled: Whether the target server is enabled. An empty/omitted value + // for this field should be interpreted as true. + Enabled bool `json:"enabled,omitempty"` - // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the - // policy to modify. Only the fields in the mask will be modified. If no - // mask is provided, the following default mask is used: `paths: - // "bindings, etag" - UpdateMask string `json:"updateMask,omitempty"` + // Host: Host name of the target server. + Host string `json:"host,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to + // Name: Target server revision name in the following format: + // `organizations/{org}/environments/{env}/targetservers/{targetserver}/r + // evisions/{rev}` + Name string `json:"name,omitempty"` + + // Port: Port number for the target server. + Port int64 `json:"port,omitempty"` + + // Protocol: The protocol used by this target server. + // + // Possible values: + // "PROTOCOL_UNSPECIFIED" - UNSPECIFIED defaults to HTTP for backwards + // compatibility. + // "HTTP" - The TargetServer uses HTTP. + // "GRPC" - The TargetServer uses GRPC. + Protocol string `json:"protocol,omitempty"` + + // TlsInfo: TLS settings for the target server. + TlsInfo *GoogleCloudApigeeV1TlsInfoConfig `json:"tlsInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9999,8 +10229,8 @@ type GoogleIamV1SetIamPolicyRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -10008,22 +10238,26 @@ type GoogleIamV1SetIamPolicyRequest struct { NullFields []string `json:"-"` } -func (s *GoogleIamV1SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1SetIamPolicyRequest +func (s *GoogleCloudApigeeV1TargetServerConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1TargetServerConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1TestIamPermissionsRequest: Request message for -// `TestIamPermissions` method. -type GoogleIamV1TestIamPermissionsRequest struct { - // Permissions: The set of permissions to check for the `resource`. - // Permissions with wildcards (such as `*` or `storage.*`) are not - // allowed. For more information see IAM Overview - // (https://cloud.google.com/iam/docs/overview#permissions). - Permissions []string `json:"permissions,omitempty"` +// GoogleCloudApigeeV1TestDatastoreResponse: The response for +// TestDatastore +type GoogleCloudApigeeV1TestDatastoreResponse struct { + // Error: Output only. Error message of test connection failure + Error string `json:"error,omitempty"` - // ForceSendFields is a list of field names (e.g. "Permissions") to + // State: Output only. It could be `completed` or `failed` + 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. "Error") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10031,33 +10265,68 @@ type GoogleIamV1TestIamPermissionsRequest struct { // 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 + // 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 *GoogleIamV1TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1TestIamPermissionsRequest +func (s *GoogleCloudApigeeV1TestDatastoreResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1TestDatastoreResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1TestIamPermissionsResponse: Response message for -// `TestIamPermissions` method. -type GoogleIamV1TestIamPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that - // the caller is allowed. - Permissions []string `json:"permissions,omitempty"` +// GoogleCloudApigeeV1TlsInfo: TLS configuration information for virtual +// hosts and TargetServers. +type GoogleCloudApigeeV1TlsInfo struct { + // Ciphers: The SSL/TLS cipher suites to be used. For programmable + // proxies, it must be one of the cipher suite names listed in: + // http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#ciphersuites. + // For configurable proxies, it must follow the configuration specified + // in: + // https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#Cipher-suite-configuration. + // This setting has no effect for configurable proxies when negotiating + // TLS 1.3. + Ciphers []string `json:"ciphers,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // ClientAuthEnabled: Optional. Enables two-way TLS. + ClientAuthEnabled bool `json:"clientAuthEnabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "Permissions") to + // CommonName: The TLS Common Name of the certificate. + CommonName *GoogleCloudApigeeV1TlsInfoCommonName `json:"commonName,omitempty"` + + // Enabled: Required. Enables TLS. If false, neither one-way nor two-way + // TLS will be enabled. + Enabled bool `json:"enabled,omitempty"` + + // IgnoreValidationErrors: If true, Edge ignores TLS certificate errors. + // Valid when configuring TLS for target servers and target endpoints, + // and when configuring virtual hosts that use 2-way TLS. When used with + // a target endpoint/target server, if the backend system uses SNI and + // returns a cert with a subject Distinguished Name (DN) that does not + // match the hostname, there is no way to ignore the error and the + // connection fails. + IgnoreValidationErrors bool `json:"ignoreValidationErrors,omitempty"` + + // KeyAlias: Required if `client_auth_enabled` is true. The resource ID + // for the alias containing the private key and cert. + KeyAlias string `json:"keyAlias,omitempty"` + + // KeyStore: Required if `client_auth_enabled` is true. The resource ID + // of the keystore. + KeyStore string `json:"keyStore,omitempty"` + + // Protocols: The TLS versioins to be used. + Protocols []string `json:"protocols,omitempty"` + + // TrustStore: The resource ID of the truststore. + TrustStore string `json:"trustStore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Ciphers") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10065,36 +10334,30 @@ type GoogleIamV1TestIamPermissionsResponse struct { // 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 + // NullFields is a list of field names (e.g. "Ciphers") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleIamV1TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1TestIamPermissionsResponse +func (s *GoogleCloudApigeeV1TlsInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1TlsInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// 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"` +type GoogleCloudApigeeV1TlsInfoCommonName struct { + // Value: The TLS Common Name string of the certificate. + Value string `json:"value,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // WildcardMatch: Indicates whether the cert should be matched against + // as a wildcard cert. + WildcardMatch bool `json:"wildcardMatch,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "Value") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10102,61 +10365,60 @@ type GoogleLongrunningListOperationsResponse struct { // 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 + // NullFields is a list of field names (e.g. "Value") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field 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 +func (s *GoogleCloudApigeeV1TlsInfoCommonName) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1TlsInfoCommonName 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"` +type GoogleCloudApigeeV1TlsInfoConfig struct { + // Ciphers: List of ciphers that are granted access. + Ciphers []string `json:"ciphers,omitempty"` - // Error: The error result of the operation in case of failure or - // cancellation. - Error *GoogleRpcStatus `json:"error,omitempty"` + // ClientAuthEnabled: Flag that specifies whether client-side + // authentication is enabled for the target server. Enables two-way TLS. + ClientAuthEnabled bool `json:"clientAuthEnabled,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"` + // CommonName: Common name to validate the target server against. + CommonName *GoogleCloudApigeeV1CommonNameConfig `json:"commonName,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 be a resource name ending with - // `operations/{unique_id}`. - Name string `json:"name,omitempty"` + // Enabled: Flag that specifies whether one-way TLS is enabled. Set to + // `true` to enable one-way TLS. + Enabled bool `json:"enabled,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"` + // IgnoreValidationErrors: Flag that specifies whether to ignore TLS + // certificate validation errors. Set to `true` to ignore errors. + IgnoreValidationErrors bool `json:"ignoreValidationErrors,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // KeyAlias: Name of the alias used for client-side authentication in + // the following format: + // `organizations/{org}/environments/{env}/keystores/{keystore}/aliases/{ + // alias}` + KeyAlias string `json:"keyAlias,omitempty"` - // ForceSendFields is a list of field names (e.g. "Done") to + // KeyAliasReference: Reference name and alias pair to use for + // client-side authentication. + KeyAliasReference *GoogleCloudApigeeV1KeyAliasReference `json:"keyAliasReference,omitempty"` + + // Protocols: List of TLS protocols that are granted access. + Protocols []string `json:"protocols,omitempty"` + + // TrustStore: Name of the keystore or keystore reference containing + // trusted certificates for the server in the following format: + // `organizations/{org}/environments/{env}/keystores/{keystore}` or + // `organizations/{org}/environments/{env}/references/{reference}` + TrustStore string `json:"trustStore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Ciphers") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10164,8 +10426,8 @@ type GoogleLongrunningOperation struct { // 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 + // NullFields is a list of field names (e.g. "Ciphers") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -10173,32 +10435,40 @@ type GoogleLongrunningOperation struct { NullFields []string `json:"-"` } -func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation +func (s *GoogleCloudApigeeV1TlsInfoConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1TlsInfoConfig 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); } -type GoogleProtobufEmpty struct { +// GoogleCloudApigeeV1TraceConfig: TraceConfig defines the +// configurations in an environment of distributed trace. +type GoogleCloudApigeeV1TraceConfig struct { + // Endpoint: Required. Endpoint of the exporter. + Endpoint string `json:"endpoint,omitempty"` + + // Exporter: Required. Exporter that is used to view the distributed + // trace captured using OpenCensus. An exporter sends traces to any + // backend that is capable of consuming them. Recorded spans can be + // exported by registered exporters. + // + // Possible values: + // "EXPORTER_UNSPECIFIED" - Exporter unspecified + // "JAEGER" - Jaeger exporter + // "CLOUD_TRACE" - Cloudtrace exporter + Exporter string `json:"exporter,omitempty"` + + // SamplingConfig: Distributed trace configuration for all API proxies + // in an environment. You can also override the configuration for a + // specific API proxy using the distributed trace configuration + // overrides API. + SamplingConfig *GoogleCloudApigeeV1TraceSamplingConfig `json:"samplingConfig,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` -} - -// GoogleRpcPreconditionFailure: Describes what preconditions have -// failed. For example, if an RPC failed because it required the Terms -// of Service to be acknowledged, it could list the terms of service -// violation in the PreconditionFailure message. -type GoogleRpcPreconditionFailure struct { - // Violations: Describes all precondition violations. - Violations []*GoogleRpcPreconditionFailureViolation `json:"violations,omitempty"` - // ForceSendFields is a list of field names (e.g. "Violations") to + // ForceSendFields is a list of field names (e.g. "Endpoint") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10206,7 +10476,7 @@ type GoogleRpcPreconditionFailure struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Violations") to include in + // NullFields is a list of field names (e.g. "Endpoint") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -10215,32 +10485,31 @@ type GoogleRpcPreconditionFailure struct { NullFields []string `json:"-"` } -func (s *GoogleRpcPreconditionFailure) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcPreconditionFailure +func (s *GoogleCloudApigeeV1TraceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1TraceConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleRpcPreconditionFailureViolation: A message type used to -// describe a single precondition failure. -type GoogleRpcPreconditionFailureViolation struct { - // Description: A description of how the precondition failed. Developers - // can use this description to understand how to fix the failure. For - // example: "Terms of service not accepted". - Description string `json:"description,omitempty"` +// GoogleCloudApigeeV1TraceConfigOverride: A representation of a +// configuration override. +type GoogleCloudApigeeV1TraceConfigOverride struct { + // ApiProxy: ID of the API proxy that will have its trace configuration + // overridden. + ApiProxy string `json:"apiProxy,omitempty"` - // Subject: The subject, relative to the type, that failed. For example, - // "google.com/cloud" relative to the "TOS" type would indicate which - // terms of service is being referenced. - Subject string `json:"subject,omitempty"` + // Name: ID of the trace configuration override specified as a + // system-generated UUID. + Name string `json:"name,omitempty"` - // Type: The type of PreconditionFailure. We recommend using a - // service-specific enum type to define the supported precondition - // violation subjects. For example, "TOS" for "Terms of Service - // violation". - Type string `json:"type,omitempty"` + // SamplingConfig: Trace configuration to override. + SamplingConfig *GoogleCloudApigeeV1TraceSamplingConfig `json:"samplingConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ApiProxy") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10248,43 +10517,43 @@ type GoogleRpcPreconditionFailureViolation struct { // 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 + // NullFields is a list of field names (e.g. "ApiProxy") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleRpcPreconditionFailureViolation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcPreconditionFailureViolation +func (s *GoogleCloudApigeeV1TraceConfigOverride) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1TraceConfigOverride 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). Each -// `Status` message contains three pieces of data: error code, error -// message, and error details. You can find out more about this error -// model and how to work with it in the API Design Guide -// (https://cloud.google.com/apis/design/errors). -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"` +// GoogleCloudApigeeV1TraceSamplingConfig: TraceSamplingConfig +// represents the detail settings of distributed tracing. Only the +// fields that are defined in the distributed trace configuration can be +// overridden using the distribute trace configuration override APIs. +type GoogleCloudApigeeV1TraceSamplingConfig struct { + // Sampler: Sampler of distributed tracing. OFF is the default value. + // + // Possible values: + // "SAMPLER_UNSPECIFIED" - Sampler unspecified. + // "OFF" - OFF means distributed trace is disabled, or the sampling + // probability is 0. + // "PROBABILITY" - PROBABILITY means traces are captured on a + // probability that defined by sampling_rate. The sampling rate is + // limited to 0 to 0.5 when this is set. + Sampler string `json:"sampler,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"` + // SamplingRate: Field sampling rate. This value is only applicable when + // using the PROBABILITY sampler. The supported values are > 0 and <= + // 0.5. + SamplingRate float64 `json:"samplingRate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "Sampler") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10292,8 +10561,8 @@ type GoogleRpcStatus struct { // 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 + // NullFields is a list of field names (e.g. "Sampler") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -10301,140 +10570,3198 @@ type GoogleRpcStatus struct { NullFields []string `json:"-"` } -func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus +func (s *GoogleCloudApigeeV1TraceSamplingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1TraceSamplingConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeExpr: Represents a textual expression in the Common -// Expression Language (CEL) syntax. CEL is a C-like expression -// language. The syntax and semantics of CEL are documented at -// https://github.com/google/cel-spec. Example (Comparison): title: -// "Summary size limit" description: "Determines if a summary is less -// than 100 chars" expression: "document.summary.size() < 100" Example -// (Equality): title: "Requestor is owner" description: "Determines if -// requestor is the document owner" expression: "document.owner == -// request.auth.claims.email" Example (Logic): title: "Public documents" -// description: "Determine whether the document should be publicly -// visible" expression: "document.type != 'private' && document.type != -// 'internal'" Example (Data Manipulation): title: "Notification string" -// description: "Create a notification string with a timestamp." -// expression: "'New message received at ' + -// string(document.create_time)" The exact variables and functions that -// may be referenced within an expression are determined by the service -// that evaluates it. See the service documentation for additional -// information. -type GoogleTypeExpr struct { - // Description: Optional. Description of the expression. This is a - // longer text which describes the expression, e.g. when hovered over it - // in a UI. - Description string `json:"description,omitempty"` - - // Expression: Textual representation of an expression in Common - // Expression Language syntax. - Expression string `json:"expression,omitempty"` +func (s *GoogleCloudApigeeV1TraceSamplingConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudApigeeV1TraceSamplingConfig + var s1 struct { + SamplingRate gensupport.JSONFloat64 `json:"samplingRate"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SamplingRate = float64(s1.SamplingRate) + return nil +} - // Location: Optional. String indicating the location of the expression - // for error reporting, e.g. a file name and a position in the file. - Location string `json:"location,omitempty"` +// GoogleCloudApigeeV1UpdateError: Details on why a resource update +// failed in the runtime. +type GoogleCloudApigeeV1UpdateError struct { + // Code: Status code. + // + // Possible values: + // "OK" - Not an error; returned on success HTTP Mapping: 200 OK + // "CANCELLED" - The operation was cancelled, typically by the caller. + // HTTP Mapping: 499 Client Closed Request + // "UNKNOWN" - Unknown error. For example, this error may be returned + // when a `Status` value received from another address space belongs to + // an error space that is not known in this address space. Also errors + // raised by APIs that do not return enough error information may be + // converted to this error. HTTP Mapping: 500 Internal Server Error + // "INVALID_ARGUMENT" - The client specified an invalid argument. Note + // that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` + // indicates arguments that are problematic regardless of the state of + // the system (e.g., a malformed file name). HTTP Mapping: 400 Bad + // Request + // "DEADLINE_EXCEEDED" - The deadline expired before the operation + // could complete. For operations that change the state of the system, + // this error may be returned even if the operation has completed + // successfully. For example, a successful response from a server could + // have been delayed long enough for the deadline to expire. HTTP + // Mapping: 504 Gateway Timeout + // "NOT_FOUND" - Some requested entity (e.g., file or directory) was + // not found. Note to server developers: if a request is denied for an + // entire class of users, such as gradual feature rollout or + // undocumented allowlist, `NOT_FOUND` may be used. If a request is + // denied for some users within a class of users, such as user-based + // access control, `PERMISSION_DENIED` must be used. HTTP Mapping: 404 + // Not Found + // "ALREADY_EXISTS" - The entity that a client attempted to create + // (e.g., file or directory) already exists. HTTP Mapping: 409 Conflict + // "PERMISSION_DENIED" - The caller does not have permission to + // execute the specified operation. `PERMISSION_DENIED` must not be used + // for rejections caused by exhausting some resource (use + // `RESOURCE_EXHAUSTED` instead for those errors). `PERMISSION_DENIED` + // must not be used if the caller can not be identified (use + // `UNAUTHENTICATED` instead for those errors). This error code does not + // imply the request is valid or the requested entity exists or + // satisfies other pre-conditions. HTTP Mapping: 403 Forbidden + // "UNAUTHENTICATED" - The request does not have valid authentication + // credentials for the operation. HTTP Mapping: 401 Unauthorized + // "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a + // per-user quota, or perhaps the entire file system is out of space. + // HTTP Mapping: 429 Too Many Requests + // "FAILED_PRECONDITION" - The operation was rejected because the + // system is not in a state required for the operation's execution. For + // example, the directory to be deleted is non-empty, an rmdir operation + // is applied to a non-directory, etc. Service implementors can use the + // following guidelines to decide between `FAILED_PRECONDITION`, + // `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can + // retry just the failing call. (b) Use `ABORTED` if the client should + // retry at a higher level. For example, when a client-specified + // test-and-set fails, indicating the client should restart a + // read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the + // client should not retry until the system state has been explicitly + // fixed. For example, if an "rmdir" fails because the directory is + // non-empty, `FAILED_PRECONDITION` should be returned since the client + // should not retry unless the files are deleted from the directory. + // HTTP Mapping: 400 Bad Request + // "ABORTED" - The operation was aborted, typically due to a + // concurrency issue such as a sequencer check failure or transaction + // abort. See the guidelines above for deciding between + // `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: + // 409 Conflict + // "OUT_OF_RANGE" - The operation was attempted past the valid range. + // E.g., seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, + // this error indicates a problem that may be fixed if the system state + // changes. For example, a 32-bit file system will generate + // `INVALID_ARGUMENT` if asked to read at an offset that is not in the + // range [0,2^32-1], but it will generate `OUT_OF_RANGE` if asked to + // read from an offset past the current file size. There is a fair bit + // of overlap between `FAILED_PRECONDITION` and `OUT_OF_RANGE`. We + // recommend using `OUT_OF_RANGE` (the more specific error) when it + // applies so that callers who are iterating through a space can easily + // look for an `OUT_OF_RANGE` error to detect when they are done. HTTP + // Mapping: 400 Bad Request + // "UNIMPLEMENTED" - The operation is not implemented or is not + // supported/enabled in this service. HTTP Mapping: 501 Not Implemented + // "INTERNAL" - Internal errors. This means that some invariants + // expected by the underlying system have been broken. This error code + // is reserved for serious errors. HTTP Mapping: 500 Internal Server + // Error + // "UNAVAILABLE" - The service is currently unavailable. This is most + // likely a transient condition, which can be corrected by retrying with + // a backoff. Note that it is not always safe to retry non-idempotent + // operations. See the guidelines above for deciding between + // `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: + // 503 Service Unavailable + // "DATA_LOSS" - Unrecoverable data loss or corruption. HTTP Mapping: + // 500 Internal Server Error + Code string `json:"code,omitempty"` + + // Message: User-friendly error message. + Message string `json:"message,omitempty"` + + // Resource: The sub resource specific to this error (e.g. a proxy + // deployed within the EnvironmentConfig). If empty the error refers to + // the top level resource. + Resource string `json:"resource,omitempty"` + + // Type: A string that uniquely identifies the type of error. This + // provides a more reliable means to deduplicate errors across revisions + // and instances. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleCloudApigeeV1UpdateError) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1UpdateError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditConfig: Specifies the audit configuration for a +// service. The configuration determines which permission types are +// logged, and what identities, if any, are exempted from logging. An +// AuditConfig must have one or more AuditLogConfigs. If there are +// AuditConfigs for both `allServices` and a specific service, the union +// of the two AuditConfigs is used for that service: the log_types +// specified in each AuditConfig are enabled, and the exempted_members +// in each AuditLogConfig are exempted. Example Policy with multiple +// AuditConfigs: { "audit_configs": [ { "service": "allServices", +// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": +// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { +// "log_type": "ADMIN_READ" } ] }, { "service": +// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": +// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ +// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy +// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts +// `jose@example.com` from DATA_READ logging, and `aliya@example.com` +// from DATA_WRITE logging. +type GoogleIamV1AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: Specifies a service that will be enabled for audit logging. + // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditLogConfig: Provides the configuration for logging a +// type of permissions. Example: { "audit_log_configs": [ { "log_type": +// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { +// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and +// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ +// logging. +type GoogleIamV1AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Binding: Associates `members`, or principals, with a +// `role`. +type GoogleIamV1Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the + // current request. If the condition evaluates to `false`, then this + // binding does not apply to the current request. However, a different + // role binding might grant the same role to one or more of the + // principals in this binding. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *GoogleTypeExpr `json:"condition,omitempty"` + + // Members: Specifies the principals requesting access for a Google + // Cloud 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@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`. * `deleted:user:{emailid}?uid={uniqueid}`: An + // email address (plus unique identifier) representing a user that has + // been recently deleted. For example, + // `alice@example.com?uid=123456789012345678901`. If the user is + // recovered, this value reverts to `user:{emailid}` and the recovered + // user retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address + // (plus unique identifier) representing a service account that has been + // recently deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + // If the service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains + // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: + // An email address (plus unique identifier) representing a Google group + // that has been recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is + // recovered, this value reverts to `group:{emailid}` and the recovered + // group retains the role in the binding. * `domain:{domain}`: The G + // Suite domain (primary) 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 the list of `members`, or principals. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Policy: An Identity and Access Management (IAM) policy, +// which specifies access controls for Google Cloud resources. A +// `Policy` is a collection of `bindings`. A `binding` binds one or more +// `members`, or principals, to a single `role`. Principals can be user +// accounts, service accounts, Google groups, and domains (such as G +// Suite). A `role` is a named list of permissions; each `role` can be +// an IAM predefined role or a user-created custom role. For some types +// of Google Cloud resources, a `binding` can also specify a +// `condition`, which is a logical expression that allows access to a +// resource only if the expression evaluates to `true`. A condition can +// add constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// For a description of IAM and its features, see the IAM documentation +// (https://cloud.google.com/iam/docs/). +type GoogleIamV1Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*GoogleIamV1Binding `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. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + 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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleIamV1Policy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1SetIamPolicyRequest: Request message for `SetIamPolicy` +// method. +type GoogleIamV1SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *GoogleIamV1Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1TestIamPermissionsRequest: Request message for +// `TestIamPermissions` method. +type GoogleIamV1TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + 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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleIamV1TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1TestIamPermissionsResponse: Response message for +// `TestIamPermissions` method. +type GoogleIamV1TestIamPermissionsResponse 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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleIamV1TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// 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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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: 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 be a resource name ending with + // `operations/{unique_id}`. + 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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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) +} + +// 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); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleRpcPreconditionFailure: Describes what preconditions have +// failed. For example, if an RPC failed because it required the Terms +// of Service to be acknowledged, it could list the terms of service +// violation in the PreconditionFailure message. +type GoogleRpcPreconditionFailure struct { + // Violations: Describes all precondition violations. + Violations []*GoogleRpcPreconditionFailureViolation `json:"violations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Violations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Violations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleRpcPreconditionFailure) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcPreconditionFailure + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleRpcPreconditionFailureViolation: A message type used to +// describe a single precondition failure. +type GoogleRpcPreconditionFailureViolation struct { + // Description: A description of how the precondition failed. Developers + // can use this description to understand how to fix the failure. For + // example: "Terms of service not accepted". + Description string `json:"description,omitempty"` + + // Subject: The subject, relative to the type, that failed. For example, + // "google.com/cloud" relative to the "TOS" type would indicate which + // terms of service is being referenced. + Subject string `json:"subject,omitempty"` + + // Type: The type of PreconditionFailure. We recommend using a + // service-specific enum type to define the supported precondition + // violation subjects. For example, "TOS" for "Terms of Service + // violation". + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleRpcPreconditionFailureViolation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcPreconditionFailureViolation + 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). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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) +} + +// GoogleTypeExpr: Represents a textual expression in the Common +// Expression Language (CEL) syntax. CEL is a C-like expression +// language. The syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec. Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type GoogleTypeExpr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleTypeExpr) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeExpr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeInterval: Represents a time interval, encoded as a +// Timestamp start (inclusive) and a Timestamp end (exclusive). The +// start must be less than or equal to the end. When the start equals +// the end, the interval is empty (matches no time). When both start and +// end are unspecified, the interval matches any time. +type GoogleTypeInterval struct { + // EndTime: Optional. Exclusive end of the interval. If specified, a + // Timestamp matching this interval will have to be before the end. + EndTime string `json:"endTime,omitempty"` + + // StartTime: Optional. Inclusive start of the interval. If specified, a + // Timestamp matching this interval will have to be the same or after + // the start. + StartTime string `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleTypeInterval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeInterval + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeMoney: Represents an amount of money with its currency +// type. +type GoogleTypeMoney struct { + // CurrencyCode: The three-letter currency code defined in ISO 4217. + CurrencyCode string `json:"currencyCode,omitempty"` + + // Nanos: Number of nano (10^-9) units of the amount. The value must be + // between -999,999,999 and +999,999,999 inclusive. If `units` is + // positive, `nanos` must be positive or zero. If `units` is zero, + // `nanos` can be positive, zero, or negative. If `units` is negative, + // `nanos` must be negative or zero. For example $-1.75 is represented + // as `units`=-1 and `nanos`=-750,000,000. + Nanos int64 `json:"nanos,omitempty"` + + // Units: The whole units of the amount. For example if `currencyCode` + // is "USD", then 1 unit is one US dollar. + Units int64 `json:"units,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "CurrencyCode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CurrencyCode") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeMoney) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeMoney + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "apigee.hybrid.issuers.list": + +type HybridIssuersListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists hybrid services and its trusted issuers service account +// ids. This api is authenticated and unauthorized(allow all the users) +// and used by runtime authn-authz service to query control plane's +// issuer service account ids. +// +// - name: Must be of the form `hybrid/issuers`. +func (r *HybridIssuersService) List(name string) *HybridIssuersListCall { + c := &HybridIssuersListCall{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 *HybridIssuersListCall) Fields(s ...googleapi.Field) *HybridIssuersListCall { + 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 *HybridIssuersListCall) IfNoneMatch(entityTag string) *HybridIssuersListCall { + 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 *HybridIssuersListCall) Context(ctx context.Context) *HybridIssuersListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *HybridIssuersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *HybridIssuersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.hybrid.issuers.list" call. +// Exactly one of *GoogleCloudApigeeV1ListHybridIssuersResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListHybridIssuersResponse.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 *HybridIssuersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListHybridIssuersResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1ListHybridIssuersResponse{ + ServerResponse: googleapi.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 hybrid services and its trusted issuers service account ids. This api is authenticated and unauthorized(allow all the users) and used by runtime authn-authz service to query control plane's issuer service account ids.", + // "flatPath": "v1/hybrid/issuers", + // "httpMethod": "GET", + // "id": "apigee.hybrid.issuers.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Must be of the form `hybrid/issuers`.", + // "location": "path", + // "pattern": "^hybrid/issuers$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudApigeeV1ListHybridIssuersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.create": + +type OrganizationsCreateCall struct { + s *Service + googlecloudapigeev1organization *GoogleCloudApigeeV1Organization + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an Apigee organization. See Create an Apigee +// organization +// (https://cloud.google.com/apigee/docs/api-platform/get-started/create-org). +func (r *OrganizationsService) Create(googlecloudapigeev1organization *GoogleCloudApigeeV1Organization) *OrganizationsCreateCall { + c := &OrganizationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googlecloudapigeev1organization = googlecloudapigeev1organization + return c +} + +// Parent sets the optional parameter "parent": Required. Name of the +// GCP project in which to associate the Apigee organization. Pass the +// information as a query parameter using the following structure in +// your request: `projects/` +func (c *OrganizationsCreateCall) Parent(parent string) *OrganizationsCreateCall { + c.urlParams_.Set("parent", parent) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsCreateCall) Fields(s ...googleapi.Field) *OrganizationsCreateCall { + 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 *OrganizationsCreateCall) Context(ctx context.Context) *OrganizationsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googlecloudapigeev1organization) + 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, "v1/organizations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apigee.organizations.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 *OrganizationsCreateCall) 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": "Creates an Apigee organization. See [Create an Apigee organization](https://cloud.google.com/apigee/docs/api-platform/get-started/create-org).", + // "flatPath": "v1/organizations", + // "httpMethod": "POST", + // "id": "apigee.organizations.create", + // "parameterOrder": [], + // "parameters": { + // "parent": { + // "description": "Required. Name of the GCP project in which to associate the Apigee organization. Pass the information as a query parameter using the following structure in your request: `projects/`", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/organizations", + // "request": { + // "$ref": "GoogleCloudApigeeV1Organization" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.delete": + +type OrganizationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete an Apigee organization. For organizations with +// BillingType EVALUATION, an immediate deletion is performed. For paid +// organizations, a soft-deletion is performed. The organization can be +// restored within the soft-deletion period - which can be controlled +// using the retention field in the request. +// +// - name: Name of the organization. Use the following structure in your +// request: `organizations/{org}`. +func (r *OrganizationsService) Delete(name string) *OrganizationsDeleteCall { + c := &OrganizationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Retention sets the optional parameter "retention": This setting is +// only applicable for organizations that are soft-deleted (i.e. +// BillingType is not EVALUATION). It controls how long Organization +// data will be retained after the initial delete operation completes. +// During this period, the Organization may be restored to its last +// known state. After this period, the Organization will no longer be +// able to be restored. +// +// Possible values: +// "DELETION_RETENTION_UNSPECIFIED" - Default data retention settings +// will be applied. +// "MINIMUM" - Organization data will be retained for the minimum +// period of 24 hours. +func (c *OrganizationsDeleteCall) Retention(retention string) *OrganizationsDeleteCall { + c.urlParams_.Set("retention", retention) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDeleteCall { + 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 *OrganizationsDeleteCall) Context(ctx context.Context) *OrganizationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.organizations.delete" 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 *OrganizationsDeleteCall) 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": "Delete an Apigee organization. For organizations with BillingType EVALUATION, an immediate deletion is performed. For paid organizations, a soft-deletion is performed. The organization can be restored within the soft-deletion period - which can be controlled using the retention field in the request.", + // "flatPath": "v1/organizations/{organizationsId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}`", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "retention": { + // "description": "Optional. This setting is only applicable for organizations that are soft-deleted (i.e. BillingType is not EVALUATION). It controls how long Organization data will be retained after the initial delete operation completes. During this period, the Organization may be restored to its last known state. After this period, the Organization will no longer be able to be restored.", + // "enum": [ + // "DELETION_RETENTION_UNSPECIFIED", + // "MINIMUM" + // ], + // "enumDescriptions": [ + // "Default data retention settings will be applied.", + // "Organization data will be retained for the minimum period of 24 hours." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.get": + +type OrganizationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the profile for an Apigee organization. See Understanding +// organizations +// (https://cloud.google.com/apigee/docs/api-platform/fundamentals/organization-structure). +// +// - name: Apigee organization name in the following format: +// `organizations/{org}`. +func (r *OrganizationsService) Get(name string) *OrganizationsGetCall { + c := &OrganizationsGetCall{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 *OrganizationsGetCall) Fields(s ...googleapi.Field) *OrganizationsGetCall { + 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 *OrganizationsGetCall) IfNoneMatch(entityTag string) *OrganizationsGetCall { + 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 *OrganizationsGetCall) Context(ctx context.Context) *OrganizationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.organizations.get" call. +// Exactly one of *GoogleCloudApigeeV1Organization or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Organization.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 *OrganizationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Organization, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1Organization{ + ServerResponse: googleapi.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 profile for an Apigee organization. See [Understanding organizations](https://cloud.google.com/apigee/docs/api-platform/fundamentals/organization-structure).", + // "flatPath": "v1/organizations/{organizationsId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Apigee organization name in the following format: `organizations/{org}`", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudApigeeV1Organization" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.getDeployedIngressConfig": + +type OrganizationsGetDeployedIngressConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetDeployedIngressConfig: Gets the deployed ingress configuration for +// an organization. +// +// - name: Name of the deployed configuration for the organization in +// the following format: 'organizations/{org}/deployedIngressConfig'. +func (r *OrganizationsService) GetDeployedIngressConfig(name string) *OrganizationsGetDeployedIngressConfigCall { + c := &OrganizationsGetDeployedIngressConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": When set to FULL, additional +// details about the specific deployments receiving traffic will be +// included in the IngressConfig response's RoutingRules. +// +// Possible values: +// "INGRESS_CONFIG_VIEW_UNSPECIFIED" - The default/unset value. The +// API will default to the BASIC view. +// "BASIC" - Include all ingress config data necessary for the runtime +// to configure ingress, but no more. Routing rules will include only +// basepath and destination environment. This the default value. +// "FULL" - Include all ingress config data, including internal debug +// info for each routing rule such as the proxy claiming a particular +// basepath and when the routing rule first appeared in the env group. +func (c *OrganizationsGetDeployedIngressConfigCall) View(view string) *OrganizationsGetDeployedIngressConfigCall { + c.urlParams_.Set("view", view) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsGetDeployedIngressConfigCall) Fields(s ...googleapi.Field) *OrganizationsGetDeployedIngressConfigCall { + 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 *OrganizationsGetDeployedIngressConfigCall) IfNoneMatch(entityTag string) *OrganizationsGetDeployedIngressConfigCall { + 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 *OrganizationsGetDeployedIngressConfigCall) Context(ctx context.Context) *OrganizationsGetDeployedIngressConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsGetDeployedIngressConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsGetDeployedIngressConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.organizations.getDeployedIngressConfig" call. +// Exactly one of *GoogleCloudApigeeV1IngressConfig or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1IngressConfig.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 *OrganizationsGetDeployedIngressConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1IngressConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1IngressConfig{ + ServerResponse: googleapi.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 deployed ingress configuration for an organization.", + // "flatPath": "v1/organizations/{organizationsId}/deployedIngressConfig", + // "httpMethod": "GET", + // "id": "apigee.organizations.getDeployedIngressConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the deployed configuration for the organization in the following format: 'organizations/{org}/deployedIngressConfig'.", + // "location": "path", + // "pattern": "^organizations/[^/]+/deployedIngressConfig$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "When set to FULL, additional details about the specific deployments receiving traffic will be included in the IngressConfig response's RoutingRules.", + // "enum": [ + // "INGRESS_CONFIG_VIEW_UNSPECIFIED", + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "The default/unset value. The API will default to the BASIC view.", + // "Include all ingress config data necessary for the runtime to configure ingress, but no more. Routing rules will include only basepath and destination environment. This the default value.", + // "Include all ingress config data, including internal debug info for each routing rule such as the proxy claiming a particular basepath and when the routing rule first appeared in the env group." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudApigeeV1IngressConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.getProjectMapping": + +type OrganizationsGetProjectMappingCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetProjectMapping: Gets the project ID and region for an Apigee +// organization. +// +// - name: Apigee organization name in the following format: +// `organizations/{org}`. +func (r *OrganizationsService) GetProjectMapping(name string) *OrganizationsGetProjectMappingCall { + c := &OrganizationsGetProjectMappingCall{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 *OrganizationsGetProjectMappingCall) Fields(s ...googleapi.Field) *OrganizationsGetProjectMappingCall { + 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 *OrganizationsGetProjectMappingCall) IfNoneMatch(entityTag string) *OrganizationsGetProjectMappingCall { + 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 *OrganizationsGetProjectMappingCall) Context(ctx context.Context) *OrganizationsGetProjectMappingCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsGetProjectMappingCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsGetProjectMappingCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+name}:getProjectMapping") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.organizations.getProjectMapping" call. +// Exactly one of *GoogleCloudApigeeV1OrganizationProjectMapping or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1OrganizationProjectMapping.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 *OrganizationsGetProjectMappingCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1OrganizationProjectMapping, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1OrganizationProjectMapping{ + ServerResponse: googleapi.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 project ID and region for an Apigee organization.", + // "flatPath": "v1/organizations/{organizationsId}:getProjectMapping", + // "httpMethod": "GET", + // "id": "apigee.organizations.getProjectMapping", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Apigee organization name in the following format: `organizations/{org}`", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:getProjectMapping", + // "response": { + // "$ref": "GoogleCloudApigeeV1OrganizationProjectMapping" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.getRuntimeConfig": + +type OrganizationsGetRuntimeConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetRuntimeConfig: Get runtime config for an organization. +// +// - name: Name of the runtime config for the organization in the +// following format: 'organizations/{org}/runtimeConfig'. +func (r *OrganizationsService) GetRuntimeConfig(name string) *OrganizationsGetRuntimeConfigCall { + c := &OrganizationsGetRuntimeConfigCall{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 *OrganizationsGetRuntimeConfigCall) Fields(s ...googleapi.Field) *OrganizationsGetRuntimeConfigCall { + 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 *OrganizationsGetRuntimeConfigCall) IfNoneMatch(entityTag string) *OrganizationsGetRuntimeConfigCall { + 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 *OrganizationsGetRuntimeConfigCall) Context(ctx context.Context) *OrganizationsGetRuntimeConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsGetRuntimeConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsGetRuntimeConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.organizations.getRuntimeConfig" call. +// Exactly one of *GoogleCloudApigeeV1RuntimeConfig or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1RuntimeConfig.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 *OrganizationsGetRuntimeConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1RuntimeConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1RuntimeConfig{ + ServerResponse: googleapi.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 runtime config for an organization.", + // "flatPath": "v1/organizations/{organizationsId}/runtimeConfig", + // "httpMethod": "GET", + // "id": "apigee.organizations.getRuntimeConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the runtime config for the organization in the following format: 'organizations/{org}/runtimeConfig'.", + // "location": "path", + // "pattern": "^organizations/[^/]+/runtimeConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudApigeeV1RuntimeConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.getSyncAuthorization": + +type OrganizationsGetSyncAuthorizationCall struct { + s *Service + name string + googlecloudapigeev1getsyncauthorizationrequest *GoogleCloudApigeeV1GetSyncAuthorizationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetSyncAuthorization: Lists the service accounts with the permissions +// required to allow the Synchronizer to download environment data from +// the control plane. An ETag is returned in the response to +// `getSyncAuthorization`. Pass that ETag when calling +// setSyncAuthorization (setSyncAuthorization) to ensure that you are +// updating the correct version. If you don't pass the ETag in the call +// to `setSyncAuthorization`, then the existing authorization is +// overwritten indiscriminately. For more information, see Configure the +// Synchronizer +// (https://cloud.google.com/apigee/docs/hybrid/latest/synchronizer-access). +// **Note**: Available to Apigee hybrid only. +// +// - name: Name of the Apigee organization. Use the following structure +// in your request: `organizations/{org}`. +func (r *OrganizationsService) GetSyncAuthorization(name string, googlecloudapigeev1getsyncauthorizationrequest *GoogleCloudApigeeV1GetSyncAuthorizationRequest) *OrganizationsGetSyncAuthorizationCall { + c := &OrganizationsGetSyncAuthorizationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1getsyncauthorizationrequest = googlecloudapigeev1getsyncauthorizationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsGetSyncAuthorizationCall) Fields(s ...googleapi.Field) *OrganizationsGetSyncAuthorizationCall { + 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 *OrganizationsGetSyncAuthorizationCall) Context(ctx context.Context) *OrganizationsGetSyncAuthorizationCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsGetSyncAuthorizationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsGetSyncAuthorizationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googlecloudapigeev1getsyncauthorizationrequest) + 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, "v1/{+name}:getSyncAuthorization") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.organizations.getSyncAuthorization" call. +// Exactly one of *GoogleCloudApigeeV1SyncAuthorization or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1SyncAuthorization.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 *OrganizationsGetSyncAuthorizationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1SyncAuthorization, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1SyncAuthorization{ + ServerResponse: googleapi.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 service accounts with the permissions required to allow the Synchronizer to download environment data from the control plane. An ETag is returned in the response to `getSyncAuthorization`. Pass that ETag when calling [setSyncAuthorization](setSyncAuthorization) to ensure that you are updating the correct version. If you don't pass the ETag in the call to `setSyncAuthorization`, then the existing authorization is overwritten indiscriminately. For more information, see [Configure the Synchronizer](https://cloud.google.com/apigee/docs/hybrid/latest/synchronizer-access). **Note**: Available to Apigee hybrid only.", + // "flatPath": "v1/organizations/{organizationsId}:getSyncAuthorization", + // "httpMethod": "POST", + // "id": "apigee.organizations.getSyncAuthorization", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the Apigee organization. Use the following structure in your request: `organizations/{org}`", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:getSyncAuthorization", + // "request": { + // "$ref": "GoogleCloudApigeeV1GetSyncAuthorizationRequest" + // }, + // "response": { + // "$ref": "GoogleCloudApigeeV1SyncAuthorization" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.list": + +type OrganizationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the Apigee organizations and associated GCP projects that +// you have permission to access. See Understanding organizations +// (https://cloud.google.com/apigee/docs/api-platform/fundamentals/organization-structure). +// +// - parent: Use the following structure in your request: +// `organizations`. +func (r *OrganizationsService) List(parent string) *OrganizationsListCall { + c := &OrganizationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsListCall) Fields(s ...googleapi.Field) *OrganizationsListCall { + 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 *OrganizationsListCall) IfNoneMatch(entityTag string) *OrganizationsListCall { + 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 *OrganizationsListCall) Context(ctx context.Context) *OrganizationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+parent}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.organizations.list" call. +// Exactly one of *GoogleCloudApigeeV1ListOrganizationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListOrganizationsResponse.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 *OrganizationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListOrganizationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1ListOrganizationsResponse{ + ServerResponse: googleapi.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 Apigee organizations and associated GCP projects that you have permission to access. See [Understanding organizations](https://cloud.google.com/apigee/docs/api-platform/fundamentals/organization-structure).", + // "flatPath": "v1/organizations", + // "httpMethod": "GET", + // "id": "apigee.organizations.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Use the following structure in your request: `organizations`", + // "location": "path", + // "pattern": "^organizations$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}", + // "response": { + // "$ref": "GoogleCloudApigeeV1ListOrganizationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.setAddons": + +type OrganizationsSetAddonsCall struct { + s *Service + org string + googlecloudapigeev1setaddonsrequest *GoogleCloudApigeeV1SetAddonsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetAddons: Configures the add-ons for the Apigee organization. The +// existing add-on configuration will be fully replaced. +// +// - org: Name of the organization. Use the following structure in your +// request: `organizations/{org}`. +func (r *OrganizationsService) SetAddons(org string, googlecloudapigeev1setaddonsrequest *GoogleCloudApigeeV1SetAddonsRequest) *OrganizationsSetAddonsCall { + c := &OrganizationsSetAddonsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.org = org + c.googlecloudapigeev1setaddonsrequest = googlecloudapigeev1setaddonsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsSetAddonsCall) Fields(s ...googleapi.Field) *OrganizationsSetAddonsCall { + 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 *OrganizationsSetAddonsCall) Context(ctx context.Context) *OrganizationsSetAddonsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsSetAddonsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsSetAddonsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googlecloudapigeev1setaddonsrequest) + 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, "v1/{+org}:setAddons") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "org": c.org, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apigee.organizations.setAddons" 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 *OrganizationsSetAddonsCall) 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": "Configures the add-ons for the Apigee organization. The existing add-on configuration will be fully replaced.", + // "flatPath": "v1/organizations/{organizationsId}:setAddons", + // "httpMethod": "POST", + // "id": "apigee.organizations.setAddons", + // "parameterOrder": [ + // "org" + // ], + // "parameters": { + // "org": { + // "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}`", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+org}:setAddons", + // "request": { + // "$ref": "GoogleCloudApigeeV1SetAddonsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.setSyncAuthorization": + +type OrganizationsSetSyncAuthorizationCall struct { + s *Service + name string + googlecloudapigeev1syncauthorization *GoogleCloudApigeeV1SyncAuthorization + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetSyncAuthorization: Sets the permissions required to allow the +// Synchronizer to download environment data from the control plane. You +// must call this API to enable proper functioning of hybrid. Pass the +// ETag when calling `setSyncAuthorization` to ensure that you are +// updating the correct version. To get an ETag, call +// getSyncAuthorization (getSyncAuthorization). If you don't pass the +// ETag in the call to `setSyncAuthorization`, then the existing +// authorization is overwritten indiscriminately. For more information, +// see Configure the Synchronizer +// (https://cloud.google.com/apigee/docs/hybrid/latest/synchronizer-access). +// **Note**: Available to Apigee hybrid only. +// +// - name: Name of the Apigee organization. Use the following structure +// in your request: `organizations/{org}`. +func (r *OrganizationsService) SetSyncAuthorization(name string, googlecloudapigeev1syncauthorization *GoogleCloudApigeeV1SyncAuthorization) *OrganizationsSetSyncAuthorizationCall { + c := &OrganizationsSetSyncAuthorizationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1syncauthorization = googlecloudapigeev1syncauthorization + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsSetSyncAuthorizationCall) Fields(s ...googleapi.Field) *OrganizationsSetSyncAuthorizationCall { + 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 *OrganizationsSetSyncAuthorizationCall) Context(ctx context.Context) *OrganizationsSetSyncAuthorizationCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsSetSyncAuthorizationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsSetSyncAuthorizationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googlecloudapigeev1syncauthorization) + 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, "v1/{+name}:setSyncAuthorization") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.organizations.setSyncAuthorization" call. +// Exactly one of *GoogleCloudApigeeV1SyncAuthorization or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1SyncAuthorization.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 *OrganizationsSetSyncAuthorizationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1SyncAuthorization, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1SyncAuthorization{ + ServerResponse: googleapi.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 permissions required to allow the Synchronizer to download environment data from the control plane. You must call this API to enable proper functioning of hybrid. Pass the ETag when calling `setSyncAuthorization` to ensure that you are updating the correct version. To get an ETag, call [getSyncAuthorization](getSyncAuthorization). If you don't pass the ETag in the call to `setSyncAuthorization`, then the existing authorization is overwritten indiscriminately. For more information, see [Configure the Synchronizer](https://cloud.google.com/apigee/docs/hybrid/latest/synchronizer-access). **Note**: Available to Apigee hybrid only.", + // "flatPath": "v1/organizations/{organizationsId}:setSyncAuthorization", + // "httpMethod": "POST", + // "id": "apigee.organizations.setSyncAuthorization", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the Apigee organization. Use the following structure in your request: `organizations/{org}`", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:setSyncAuthorization", + // "request": { + // "$ref": "GoogleCloudApigeeV1SyncAuthorization" + // }, + // "response": { + // "$ref": "GoogleCloudApigeeV1SyncAuthorization" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.update": + +type OrganizationsUpdateCall struct { + s *Service + name string + googlecloudapigeev1organization *GoogleCloudApigeeV1Organization + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates the properties for an Apigee organization. No other +// fields in the organization profile will be updated. +// +// - name: Apigee organization name in the following format: +// `organizations/{org}`. +func (r *OrganizationsService) Update(name string, googlecloudapigeev1organization *GoogleCloudApigeeV1Organization) *OrganizationsUpdateCall { + c := &OrganizationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1organization = googlecloudapigeev1organization + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsUpdateCall) Fields(s ...googleapi.Field) *OrganizationsUpdateCall { + 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 *OrganizationsUpdateCall) Context(ctx context.Context) *OrganizationsUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googlecloudapigeev1organization) + 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, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.organizations.update" call. +// Exactly one of *GoogleCloudApigeeV1Organization or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Organization.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 *OrganizationsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Organization, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1Organization{ + ServerResponse: googleapi.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 properties for an Apigee organization. No other fields in the organization profile will be updated.", + // "flatPath": "v1/organizations/{organizationsId}", + // "httpMethod": "PUT", + // "id": "apigee.organizations.update", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Apigee organization name in the following format: `organizations/{org}`", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1Organization" + // }, + // "response": { + // "$ref": "GoogleCloudApigeeV1Organization" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.analytics.datastores.create": + +type OrganizationsAnalyticsDatastoresCreateCall struct { + s *Service + parent string + googlecloudapigeev1datastore *GoogleCloudApigeeV1Datastore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a Datastore for an org +// +// - parent: The parent organization name. Must be of the form +// `organizations/{org}`. +func (r *OrganizationsAnalyticsDatastoresService) Create(parent string, googlecloudapigeev1datastore *GoogleCloudApigeeV1Datastore) *OrganizationsAnalyticsDatastoresCreateCall { + c := &OrganizationsAnalyticsDatastoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1datastore = googlecloudapigeev1datastore + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsAnalyticsDatastoresCreateCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsDatastoresCreateCall { + 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 *OrganizationsAnalyticsDatastoresCreateCall) Context(ctx context.Context) *OrganizationsAnalyticsDatastoresCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsAnalyticsDatastoresCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsAnalyticsDatastoresCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googlecloudapigeev1datastore) + 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, "v1/{+parent}/analytics/datastores") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.organizations.analytics.datastores.create" call. +// Exactly one of *GoogleCloudApigeeV1Datastore or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Datastore.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 *OrganizationsAnalyticsDatastoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Datastore, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1Datastore{ + ServerResponse: googleapi.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 Datastore for an org", + // "flatPath": "v1/organizations/{organizationsId}/analytics/datastores", + // "httpMethod": "POST", + // "id": "apigee.organizations.analytics.datastores.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent organization name. Must be of the form `organizations/{org}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/analytics/datastores", + // "request": { + // "$ref": "GoogleCloudApigeeV1Datastore" + // }, + // "response": { + // "$ref": "GoogleCloudApigeeV1Datastore" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.analytics.datastores.delete": + +type OrganizationsAnalyticsDatastoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete a Datastore from an org. +// +// - name: Resource name of the Datastore to be deleted. Must be of the +// form `organizations/{org}/analytics/datastores/{datastoreId}`. +func (r *OrganizationsAnalyticsDatastoresService) Delete(name string) *OrganizationsAnalyticsDatastoresDeleteCall { + c := &OrganizationsAnalyticsDatastoresDeleteCall{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 *OrganizationsAnalyticsDatastoresDeleteCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsDatastoresDeleteCall { + 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 *OrganizationsAnalyticsDatastoresDeleteCall) Context(ctx context.Context) *OrganizationsAnalyticsDatastoresDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsAnalyticsDatastoresDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsAnalyticsDatastoresDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.organizations.analytics.datastores.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 *OrganizationsAnalyticsDatastoresDeleteCall) 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": "Delete a Datastore from an org.", + // "flatPath": "v1/organizations/{organizationsId}/analytics/datastores/{datastoresId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.analytics.datastores.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the Datastore to be deleted. Must be of the form `organizations/{org}/analytics/datastores/{datastoreId}`", + // "location": "path", + // "pattern": "^organizations/[^/]+/analytics/datastores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } - // Title: Optional. Title for the expression, i.e. a short string - // describing its purpose. This can be used e.g. in UIs which allow to - // enter the expression. - Title string `json:"title,omitempty"` +} - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// method id "apigee.organizations.analytics.datastores.get": - // 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:"-"` +type OrganizationsAnalyticsDatastoresGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeExpr - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// Get: Get a Datastore +// +// - name: Resource name of the Datastore to be get. Must be of the form +// `organizations/{org}/analytics/datastores/{datastoreId}`. +func (r *OrganizationsAnalyticsDatastoresService) Get(name string) *OrganizationsAnalyticsDatastoresGetCall { + c := &OrganizationsAnalyticsDatastoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c } -// GoogleTypeMoney: Represents an amount of money with its currency -// type. -type GoogleTypeMoney struct { - // CurrencyCode: The three-letter currency code defined in ISO 4217. - CurrencyCode string `json:"currencyCode,omitempty"` +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsAnalyticsDatastoresGetCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsDatastoresGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} - // Nanos: Number of nano (10^-9) units of the amount. The value must be - // between -999,999,999 and +999,999,999 inclusive. If `units` is - // positive, `nanos` must be positive or zero. If `units` is zero, - // `nanos` can be positive, zero, or negative. If `units` is negative, - // `nanos` must be negative or zero. For example $-1.75 is represented - // as `units`=-1 and `nanos`=-750,000,000. - Nanos int64 `json:"nanos,omitempty"` +// 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 *OrganizationsAnalyticsDatastoresGetCall) IfNoneMatch(entityTag string) *OrganizationsAnalyticsDatastoresGetCall { + c.ifNoneMatch_ = entityTag + return c +} - // Units: The whole units of the amount. For example if `currencyCode` - // is "USD", then 1 unit is one US dollar. - Units int64 `json:"units,omitempty,string"` +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsAnalyticsDatastoresGetCall) Context(ctx context.Context) *OrganizationsAnalyticsDatastoresGetCall { + c.ctx_ = ctx + return c +} - // ForceSendFields is a list of field names (e.g. "CurrencyCode") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsAnalyticsDatastoresGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} - // NullFields is a list of field names (e.g. "CurrencyCode") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +func (c *OrganizationsAnalyticsDatastoresGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } -func (s *GoogleTypeMoney) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeMoney - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// Do executes the "apigee.organizations.analytics.datastores.get" call. +// Exactly one of *GoogleCloudApigeeV1Datastore or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Datastore.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 *OrganizationsAnalyticsDatastoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Datastore, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1Datastore{ + ServerResponse: googleapi.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 Datastore", + // "flatPath": "v1/organizations/{organizationsId}/analytics/datastores/{datastoresId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.analytics.datastores.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the Datastore to be get. Must be of the form `organizations/{org}/analytics/datastores/{datastoreId}`", + // "location": "path", + // "pattern": "^organizations/[^/]+/analytics/datastores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudApigeeV1Datastore" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } -// method id "apigee.hybrid.issuers.list": +// method id "apigee.organizations.analytics.datastores.list": -type HybridIssuersListCall struct { +type OrganizationsAnalyticsDatastoresListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists hybrid services and its trusted issuers service account -// ids. This api is authenticated and unauthorized(allow all the users) -// and used by runtime authn-authz service to query control plane's -// issuer service account ids. +// List: List Datastores // -// - name: Must be of the form `hybrid/issuers`. -func (r *HybridIssuersService) List(name string) *HybridIssuersListCall { - c := &HybridIssuersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent organization name. Must be of the form +// `organizations/{org}`. +func (r *OrganizationsAnalyticsDatastoresService) List(parent string) *OrganizationsAnalyticsDatastoresListCall { + c := &OrganizationsAnalyticsDatastoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// TargetType sets the optional parameter "targetType": TargetType is +// used to fetch all Datastores that match the type +func (c *OrganizationsAnalyticsDatastoresListCall) TargetType(targetType string) *OrganizationsAnalyticsDatastoresListCall { + c.urlParams_.Set("targetType", targetType) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HybridIssuersListCall) Fields(s ...googleapi.Field) *HybridIssuersListCall { +func (c *OrganizationsAnalyticsDatastoresListCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsDatastoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10444,7 +13771,7 @@ func (c *HybridIssuersListCall) Fields(s ...googleapi.Field) *HybridIssuersListC // 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 *HybridIssuersListCall) IfNoneMatch(entityTag string) *HybridIssuersListCall { +func (c *OrganizationsAnalyticsDatastoresListCall) IfNoneMatch(entityTag string) *OrganizationsAnalyticsDatastoresListCall { c.ifNoneMatch_ = entityTag return c } @@ -10452,21 +13779,21 @@ func (c *HybridIssuersListCall) IfNoneMatch(entityTag string) *HybridIssuersList // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HybridIssuersListCall) Context(ctx context.Context) *HybridIssuersListCall { +func (c *OrganizationsAnalyticsDatastoresListCall) Context(ctx context.Context) *OrganizationsAnalyticsDatastoresListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HybridIssuersListCall) Header() http.Header { +func (c *OrganizationsAnalyticsDatastoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HybridIssuersListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsAnalyticsDatastoresListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10479,7 +13806,7 @@ func (c *HybridIssuersListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/analytics/datastores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -10487,21 +13814,21 @@ func (c *HybridIssuersListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.hybrid.issuers.list" call. -// Exactly one of *GoogleCloudApigeeV1ListHybridIssuersResponse or error +// Do executes the "apigee.organizations.analytics.datastores.list" call. +// Exactly one of *GoogleCloudApigeeV1ListDatastoresResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudApigeeV1ListHybridIssuersResponse.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudApigeeV1ListDatastoresResponse.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 *HybridIssuersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListHybridIssuersResponse, error) { +func (c *OrganizationsAnalyticsDatastoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDatastoresResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10520,7 +13847,7 @@ func (c *HybridIssuersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListHybridIssuersResponse{ + ret := &GoogleCloudApigeeV1ListDatastoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10532,25 +13859,30 @@ func (c *HybridIssuersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAp } return ret, nil // { - // "description": "Lists hybrid services and its trusted issuers service account ids. This api is authenticated and unauthorized(allow all the users) and used by runtime authn-authz service to query control plane's issuer service account ids.", - // "flatPath": "v1/hybrid/issuers", + // "description": "List Datastores", + // "flatPath": "v1/organizations/{organizationsId}/analytics/datastores", // "httpMethod": "GET", - // "id": "apigee.hybrid.issuers.list", + // "id": "apigee.organizations.analytics.datastores.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Must be of the form `hybrid/issuers`.", + // "parent": { + // "description": "Required. The parent organization name. Must be of the form `organizations/{org}`.", // "location": "path", - // "pattern": "^hybrid/issuers$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" + // }, + // "targetType": { + // "description": "Optional. TargetType is used to fetch all Datastores that match the type", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/analytics/datastores", // "response": { - // "$ref": "GoogleCloudApigeeV1ListHybridIssuersResponse" + // "$ref": "GoogleCloudApigeeV1ListDatastoresResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10559,38 +13891,179 @@ func (c *HybridIssuersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAp } -// method id "apigee.organizations.create": +// method id "apigee.organizations.analytics.datastores.test": -type OrganizationsCreateCall struct { - s *Service - googlecloudapigeev1organization *GoogleCloudApigeeV1Organization - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsAnalyticsDatastoresTestCall struct { + s *Service + parent string + googlecloudapigeev1datastore *GoogleCloudApigeeV1Datastore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an Apigee organization. See Create an Apigee -// organization -// (https://cloud.google.com/apigee/docs/api-platform/get-started/create-org). -func (r *OrganizationsService) Create(googlecloudapigeev1organization *GoogleCloudApigeeV1Organization) *OrganizationsCreateCall { - c := &OrganizationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googlecloudapigeev1organization = googlecloudapigeev1organization +// Test: Test if Datastore configuration is correct. This includes +// checking if credentials provided by customer have required +// permissions in target destination storage +// +// - parent: The parent organization name Must be of the form +// `organizations/{org}`. +func (r *OrganizationsAnalyticsDatastoresService) Test(parent string, googlecloudapigeev1datastore *GoogleCloudApigeeV1Datastore) *OrganizationsAnalyticsDatastoresTestCall { + c := &OrganizationsAnalyticsDatastoresTestCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1datastore = googlecloudapigeev1datastore return c } -// Parent sets the optional parameter "parent": Required. Name of the -// GCP project in which to associate the Apigee organization. Pass the -// information as a query parameter using the following structure in -// your request: `projects/` -func (c *OrganizationsCreateCall) Parent(parent string) *OrganizationsCreateCall { - c.urlParams_.Set("parent", parent) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsAnalyticsDatastoresTestCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsDatastoresTestCall { + 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 *OrganizationsAnalyticsDatastoresTestCall) Context(ctx context.Context) *OrganizationsAnalyticsDatastoresTestCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsAnalyticsDatastoresTestCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsAnalyticsDatastoresTestCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googlecloudapigeev1datastore) + 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, "v1/{+parent}/analytics/datastores:test") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.organizations.analytics.datastores.test" call. +// Exactly one of *GoogleCloudApigeeV1TestDatastoreResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1TestDatastoreResponse.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 *OrganizationsAnalyticsDatastoresTestCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TestDatastoreResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1TestDatastoreResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Test if Datastore configuration is correct. This includes checking if credentials provided by customer have required permissions in target destination storage", + // "flatPath": "v1/organizations/{organizationsId}/analytics/datastores:test", + // "httpMethod": "POST", + // "id": "apigee.organizations.analytics.datastores.test", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent organization name Must be of the form `organizations/{org}`", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/analytics/datastores:test", + // "request": { + // "$ref": "GoogleCloudApigeeV1Datastore" + // }, + // "response": { + // "$ref": "GoogleCloudApigeeV1TestDatastoreResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.analytics.datastores.update": + +type OrganizationsAnalyticsDatastoresUpdateCall struct { + s *Service + name string + googlecloudapigeev1datastore *GoogleCloudApigeeV1Datastore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Update a Datastore +// +// - name: The resource name of datastore to be updated. Must be of the +// form `organizations/{org}/analytics/datastores/{datastoreId}`. +func (r *OrganizationsAnalyticsDatastoresService) Update(name string, googlecloudapigeev1datastore *GoogleCloudApigeeV1Datastore) *OrganizationsAnalyticsDatastoresUpdateCall { + c := &OrganizationsAnalyticsDatastoresUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1datastore = googlecloudapigeev1datastore return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsCreateCall) Fields(s ...googleapi.Field) *OrganizationsCreateCall { +func (c *OrganizationsAnalyticsDatastoresUpdateCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsDatastoresUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10598,21 +14071,21 @@ func (c *OrganizationsCreateCall) Fields(s ...googleapi.Field) *OrganizationsCre // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsCreateCall) Context(ctx context.Context) *OrganizationsCreateCall { +func (c *OrganizationsAnalyticsDatastoresUpdateCall) Context(ctx context.Context) *OrganizationsAnalyticsDatastoresUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsCreateCall) Header() http.Header { +func (c *OrganizationsAnalyticsDatastoresUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsAnalyticsDatastoresUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10620,31 +14093,34 @@ func (c *OrganizationsCreateCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1organization) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1datastore) 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, "v1/organizations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.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 +// Do executes the "apigee.organizations.analytics.datastores.update" call. +// Exactly one of *GoogleCloudApigeeV1Datastore or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Datastore.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 *OrganizationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsAnalyticsDatastoresUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Datastore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10663,7 +14139,7 @@ func (c *OrganizationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongr if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1Datastore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10675,24 +14151,28 @@ func (c *OrganizationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongr } return ret, nil // { - // "description": "Creates an Apigee organization. See [Create an Apigee organization](https://cloud.google.com/apigee/docs/api-platform/get-started/create-org).", - // "flatPath": "v1/organizations", - // "httpMethod": "POST", - // "id": "apigee.organizations.create", - // "parameterOrder": [], + // "description": "Update a Datastore", + // "flatPath": "v1/organizations/{organizationsId}/analytics/datastores/{datastoresId}", + // "httpMethod": "PUT", + // "id": "apigee.organizations.analytics.datastores.update", + // "parameterOrder": [ + // "name" + // ], // "parameters": { - // "parent": { - // "description": "Required. Name of the GCP project in which to associate the Apigee organization. Pass the information as a query parameter using the following structure in your request: `projects/`", - // "location": "query", + // "name": { + // "description": "Required. The resource name of datastore to be updated. Must be of the form `organizations/{org}/analytics/datastores/{datastoreId}`", + // "location": "path", + // "pattern": "^organizations/[^/]+/analytics/datastores/[^/]+$", + // "required": true, // "type": "string" // } // }, - // "path": "v1/organizations", + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudApigeeV1Organization" + // "$ref": "GoogleCloudApigeeV1Datastore" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1Datastore" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10701,52 +14181,42 @@ func (c *OrganizationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongr } -// method id "apigee.organizations.delete": +// method id "apigee.organizations.apiproducts.attributes": -type OrganizationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApiproductsAttributesCall struct { + s *Service + name string + googlecloudapigeev1attributes *GoogleCloudApigeeV1Attributes + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Delete an Apigee organization. For organizations with -// BillingType EVALUATION, an immediate deletion is performed. For paid -// organizations, a soft-deletion is performed. The organization can be -// restored within the soft-deletion period - which can be controlled -// using the retention field in the request. +// Attributes: Updates or creates API product attributes. This API +// **replaces** the current list of attributes with the attributes +// specified in the request body. In this way, you can update existing +// attributes, add new attributes, or delete existing attributes by +// omitting them from the request body. **Note**: OAuth access tokens +// and Key Management Service (KMS) entities (apps, developers, and API +// products) are cached for 180 seconds (current default). Any custom +// attributes associated with entities also get cached for at least 180 +// seconds after entity is accessed during runtime. In this case, the +// `ExpiresIn` element on the OAuthV2 policy won't be able to expire an +// access token in less than 180 seconds. // -// - name: Name of the organization. Use the following structure in your -// request: `organizations/{org}`. -func (r *OrganizationsService) Delete(name string) *OrganizationsDeleteCall { - c := &OrganizationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the API product. Use the following structure in your +// request: `organizations/{org}/apiproducts/{apiproduct}`. +func (r *OrganizationsApiproductsService) Attributes(name string, googlecloudapigeev1attributes *GoogleCloudApigeeV1Attributes) *OrganizationsApiproductsAttributesCall { + c := &OrganizationsApiproductsAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - return c -} - -// Retention sets the optional parameter "retention": This setting is -// only applicable for organizations that are soft-deleted (i.e. -// BillingType is not EVALUATION). It controls how long Organization -// data will be retained after the initial delete operation completes. -// During this period, the Organization may be restored to its last -// known state. After this period, the Organization will no longer be -// able to be restored. -// -// Possible values: -// "DELETION_RETENTION_UNSPECIFIED" - Default data retention settings -// will be applied. -// "MINIMUM" - Organization data will be retained for the minimum -// period of 24 hours. -func (c *OrganizationsDeleteCall) Retention(retention string) *OrganizationsDeleteCall { - c.urlParams_.Set("retention", retention) + c.googlecloudapigeev1attributes = googlecloudapigeev1attributes return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDeleteCall { +func (c *OrganizationsApiproductsAttributesCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsAttributesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10754,21 +14224,21 @@ func (c *OrganizationsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDeleteCall) Context(ctx context.Context) *OrganizationsDeleteCall { +func (c *OrganizationsApiproductsAttributesCall) Context(ctx context.Context) *OrganizationsApiproductsAttributesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDeleteCall) Header() http.Header { +func (c *OrganizationsApiproductsAttributesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsAttributesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10776,11 +14246,16 @@ func (c *OrganizationsDeleteCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1attributes) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/attributes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -10791,14 +14266,14 @@ func (c *OrganizationsDeleteCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.delete" 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 +// Do executes the "apigee.organizations.apiproducts.attributes" call. +// Exactly one of *GoogleCloudApigeeV1Attributes or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Attributes.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 *OrganizationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsApiproductsAttributesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attributes, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10817,7 +14292,7 @@ func (c *OrganizationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongr if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1Attributes{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10829,38 +14304,28 @@ func (c *OrganizationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongr } return ret, nil // { - // "description": "Delete an Apigee organization. For organizations with BillingType EVALUATION, an immediate deletion is performed. For paid organizations, a soft-deletion is performed. The organization can be restored within the soft-deletion period - which can be controlled using the retention field in the request.", - // "flatPath": "v1/organizations/{organizationsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.delete", + // "description": "Updates or creates API product attributes. This API **replaces** the current list of attributes with the attributes specified in the request body. In this way, you can update existing attributes, add new attributes, or delete existing attributes by omitting them from the request body. **Note**: OAuth access tokens and Key Management Service (KMS) entities (apps, developers, and API products) are cached for 180 seconds (current default). Any custom attributes associated with entities also get cached for at least 180 seconds after entity is accessed during runtime. In this case, the `ExpiresIn` element on the OAuthV2 policy won't be able to expire an access token in less than 180 seconds.", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/attributes", + // "httpMethod": "POST", + // "id": "apigee.organizations.apiproducts.attributes", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}`", + // "description": "Required. Name of the API product. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/apiproducts/[^/]+$", // "required": true, // "type": "string" - // }, - // "retention": { - // "description": "Optional. This setting is only applicable for organizations that are soft-deleted (i.e. BillingType is not EVALUATION). It controls how long Organization data will be retained after the initial delete operation completes. During this period, the Organization may be restored to its last known state. After this period, the Organization will no longer be able to be restored.", - // "enum": [ - // "DELETION_RETENTION_UNSPECIFIED", - // "MINIMUM" - // ], - // "enumDescriptions": [ - // "Default data retention settings will be applied.", - // "Organization data will be retained for the minimum period of 24 hours." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}/attributes", + // "request": { + // "$ref": "GoogleCloudApigeeV1Attributes" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1Attributes" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10869,98 +14334,108 @@ func (c *OrganizationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongr } -// method id "apigee.organizations.get": +// method id "apigee.organizations.apiproducts.create": -type OrganizationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsApiproductsCreateCall struct { + s *Service + parent string + googlecloudapigeev1apiproduct *GoogleCloudApigeeV1ApiProduct + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the profile for an Apigee organization. See Understanding -// organizations -// (https://cloud.google.com/apigee/docs/api-platform/fundamentals/organization-structure). +// Create: Creates an API product in an organization. You create API +// products after you have proxied backend services using API proxies. +// An API product is a collection of API resources combined with quota +// settings and metadata that you can use to deliver customized and +// productized API bundles to your developer community. This metadata +// can include: - Scope - Environments - API proxies - Extensible +// profile API products enable you repackage APIs on the fly, without +// having to do any additional coding or configuration. Apigee +// recommends that you start with a simple API product including only +// required elements. You then provision credentials to apps to enable +// them to start testing your APIs. After you have authentication and +// authorization working against a simple API product, you can iterate +// to create finer-grained API products, defining different sets of API +// resources for each API product. **WARNING:** - If you don't specify +// an API proxy in the request body, *any* app associated with the +// product can make calls to *any* API in your entire organization. - If +// you don't specify an environment in the request body, the product +// allows access to all environments. For more information, see What is +// an API product? // -// - name: Apigee organization name in the following format: +// - parent: Name of the organization in which the API product will be +// created. Use the following structure in your request: // `organizations/{org}`. -func (r *OrganizationsService) Get(name string) *OrganizationsGetCall { - c := &OrganizationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +func (r *OrganizationsApiproductsService) Create(parent string, googlecloudapigeev1apiproduct *GoogleCloudApigeeV1ApiProduct) *OrganizationsApiproductsCreateCall { + c := &OrganizationsApiproductsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1apiproduct = googlecloudapigeev1apiproduct return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsGetCall) Fields(s ...googleapi.Field) *OrganizationsGetCall { +func (c *OrganizationsApiproductsCreateCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsCreateCall { 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 *OrganizationsGetCall) IfNoneMatch(entityTag string) *OrganizationsGetCall { - 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 *OrganizationsGetCall) Context(ctx context.Context) *OrganizationsGetCall { +func (c *OrganizationsApiproductsCreateCall) Context(ctx context.Context) *OrganizationsApiproductsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsGetCall) Header() http.Header { +func (c *OrganizationsApiproductsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1apiproduct) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apiproducts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.get" call. -// Exactly one of *GoogleCloudApigeeV1Organization or error will be +// Do executes the "apigee.organizations.apiproducts.create" call. +// Exactly one of *GoogleCloudApigeeV1ApiProduct or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Organization.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 +// either *GoogleCloudApigeeV1ApiProduct.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 *OrganizationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Organization, error) { +func (c *OrganizationsApiproductsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProduct, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10979,7 +14454,7 @@ func (c *OrganizationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApi if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Organization{ + ret := &GoogleCloudApigeeV1ApiProduct{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10991,25 +14466,28 @@ func (c *OrganizationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApi } return ret, nil // { - // "description": "Gets the profile for an Apigee organization. See [Understanding organizations](https://cloud.google.com/apigee/docs/api-platform/fundamentals/organization-structure).", - // "flatPath": "v1/organizations/{organizationsId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.get", + // "description": "Creates an API product in an organization. You create API products after you have proxied backend services using API proxies. An API product is a collection of API resources combined with quota settings and metadata that you can use to deliver customized and productized API bundles to your developer community. This metadata can include: - Scope - Environments - API proxies - Extensible profile API products enable you repackage APIs on the fly, without having to do any additional coding or configuration. Apigee recommends that you start with a simple API product including only required elements. You then provision credentials to apps to enable them to start testing your APIs. After you have authentication and authorization working against a simple API product, you can iterate to create finer-grained API products, defining different sets of API resources for each API product. **WARNING:** - If you don't specify an API proxy in the request body, *any* app associated with the product can make calls to *any* API in your entire organization. - If you don't specify an environment in the request body, the product allows access to all environments. For more information, see What is an API product?", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts", + // "httpMethod": "POST", + // "id": "apigee.organizations.apiproducts.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Apigee organization name in the following format: `organizations/{org}`", + // "parent": { + // "description": "Required. Name of the organization in which the API product will be created. Use the following structure in your request: `organizations/{org}`", // "location": "path", // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/apiproducts", + // "request": { + // "$ref": "GoogleCloudApigeeV1ApiProduct" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Organization" + // "$ref": "GoogleCloudApigeeV1ApiProduct" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11018,97 +14496,72 @@ func (c *OrganizationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApi } -// method id "apigee.organizations.getDeployedIngressConfig": +// method id "apigee.organizations.apiproducts.delete": -type OrganizationsGetDeployedIngressConfigCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsApiproductsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetDeployedIngressConfig: Gets the deployed ingress configuration for -// an organization. +// Delete: Deletes an API product from an organization. Deleting an API +// product causes app requests to the resource URIs defined in the API +// product to fail. Ensure that you create a new API product to serve +// existing apps, unless your intention is to disable access to the +// resources defined in the API product. The API product name required +// in the request URL is the internal name of the product, not the +// display name. While they may be the same, it depends on whether the +// API product was created via the UI or the API. View the list of API +// products to verify the internal name. // -// - name: Name of the deployed configuration for the organization in -// the following format: 'organizations/{org}/deployedIngressConfig'. -func (r *OrganizationsService) GetDeployedIngressConfig(name string) *OrganizationsGetDeployedIngressConfigCall { - c := &OrganizationsGetDeployedIngressConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the API product. Use the following structure in your +// request: `organizations/{org}/apiproducts/{apiproduct}`. +func (r *OrganizationsApiproductsService) Delete(name string) *OrganizationsApiproductsDeleteCall { + c := &OrganizationsApiproductsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// View sets the optional parameter "view": When set to FULL, additional -// details about the specific deployments receiving traffic will be -// included in the IngressConfig response's RoutingRules. -// -// Possible values: -// "INGRESS_CONFIG_VIEW_UNSPECIFIED" - The default/unset value. The -// API will default to the BASIC view. -// "BASIC" - Include all ingress config data necessary for the runtime -// to configure ingress, but no more. Routing rules will include only -// basepath and destination environment. This the default value. -// "FULL" - Include all ingress config data, including internal debug -// info for each routing rule such as the proxy claiming a particular -// basepath and when the routing rule first appeared in the env group. -func (c *OrganizationsGetDeployedIngressConfigCall) View(view string) *OrganizationsGetDeployedIngressConfigCall { - c.urlParams_.Set("view", view) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsGetDeployedIngressConfigCall) Fields(s ...googleapi.Field) *OrganizationsGetDeployedIngressConfigCall { +func (c *OrganizationsApiproductsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsDeleteCall { 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 *OrganizationsGetDeployedIngressConfigCall) IfNoneMatch(entityTag string) *OrganizationsGetDeployedIngressConfigCall { - 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 *OrganizationsGetDeployedIngressConfigCall) Context(ctx context.Context) *OrganizationsGetDeployedIngressConfigCall { +func (c *OrganizationsApiproductsDeleteCall) Context(ctx context.Context) *OrganizationsApiproductsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsGetDeployedIngressConfigCall) Header() http.Header { +func (c *OrganizationsApiproductsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsGetDeployedIngressConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -11119,14 +14572,14 @@ func (c *OrganizationsGetDeployedIngressConfigCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.getDeployedIngressConfig" call. -// Exactly one of *GoogleCloudApigeeV1IngressConfig or error will be +// Do executes the "apigee.organizations.apiproducts.delete" call. +// Exactly one of *GoogleCloudApigeeV1ApiProduct or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1IngressConfig.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 +// either *GoogleCloudApigeeV1ApiProduct.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 *OrganizationsGetDeployedIngressConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1IngressConfig, error) { +func (c *OrganizationsApiproductsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProduct, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11145,7 +14598,7 @@ func (c *OrganizationsGetDeployedIngressConfigCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1IngressConfig{ + ret := &GoogleCloudApigeeV1ApiProduct{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11157,40 +14610,25 @@ func (c *OrganizationsGetDeployedIngressConfigCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Gets the deployed ingress configuration for an organization.", - // "flatPath": "v1/organizations/{organizationsId}/deployedIngressConfig", - // "httpMethod": "GET", - // "id": "apigee.organizations.getDeployedIngressConfig", + // "description": "Deletes an API product from an organization. Deleting an API product causes app requests to the resource URIs defined in the API product to fail. Ensure that you create a new API product to serve existing apps, unless your intention is to disable access to the resources defined in the API product. The API product name required in the request URL is the internal name of the product, not the display name. While they may be the same, it depends on whether the API product was created via the UI or the API. View the list of API products to verify the internal name.", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.apiproducts.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the deployed configuration for the organization in the following format: 'organizations/{org}/deployedIngressConfig'.", + // "description": "Required. Name of the API product. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}`", // "location": "path", - // "pattern": "^organizations/[^/]+/deployedIngressConfig$", + // "pattern": "^organizations/[^/]+/apiproducts/[^/]+$", // "required": true, // "type": "string" - // }, - // "view": { - // "description": "When set to FULL, additional details about the specific deployments receiving traffic will be included in the IngressConfig response's RoutingRules.", - // "enum": [ - // "INGRESS_CONFIG_VIEW_UNSPECIFIED", - // "BASIC", - // "FULL" - // ], - // "enumDescriptions": [ - // "The default/unset value. The API will default to the BASIC view.", - // "Include all ingress config data necessary for the runtime to configure ingress, but no more. Routing rules will include only basepath and destination environment. This the default value.", - // "Include all ingress config data, including internal debug info for each routing rule such as the proxy claiming a particular basepath and when the routing rule first appeared in the env group." - // ], - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1IngressConfig" + // "$ref": "GoogleCloudApigeeV1ApiProduct" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11199,9 +14637,9 @@ func (c *OrganizationsGetDeployedIngressConfigCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.getProjectMapping": +// method id "apigee.organizations.apiproducts.get": -type OrganizationsGetProjectMappingCall struct { +type OrganizationsApiproductsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -11210,13 +14648,16 @@ type OrganizationsGetProjectMappingCall struct { header_ http.Header } -// GetProjectMapping: Gets the project ID and region for an Apigee -// organization. +// Get: Gets configuration details for an API product. The API product +// name required in the request URL is the internal name of the product, +// not the display name. While they may be the same, it depends on +// whether the API product was created via the UI or the API. View the +// list of API products to verify the internal name. // -// - name: Apigee organization name in the following format: -// `organizations/{org}`. -func (r *OrganizationsService) GetProjectMapping(name string) *OrganizationsGetProjectMappingCall { - c := &OrganizationsGetProjectMappingCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the API product. Use the following structure in your +// request: `organizations/{org}/apiproducts/{apiproduct}`. +func (r *OrganizationsApiproductsService) Get(name string) *OrganizationsApiproductsGetCall { + c := &OrganizationsApiproductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -11224,7 +14665,7 @@ func (r *OrganizationsService) GetProjectMapping(name string) *OrganizationsGetP // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsGetProjectMappingCall) Fields(s ...googleapi.Field) *OrganizationsGetProjectMappingCall { +func (c *OrganizationsApiproductsGetCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11234,7 +14675,7 @@ func (c *OrganizationsGetProjectMappingCall) Fields(s ...googleapi.Field) *Organ // 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 *OrganizationsGetProjectMappingCall) IfNoneMatch(entityTag string) *OrganizationsGetProjectMappingCall { +func (c *OrganizationsApiproductsGetCall) IfNoneMatch(entityTag string) *OrganizationsApiproductsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -11242,21 +14683,21 @@ func (c *OrganizationsGetProjectMappingCall) IfNoneMatch(entityTag string) *Orga // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsGetProjectMappingCall) Context(ctx context.Context) *OrganizationsGetProjectMappingCall { +func (c *OrganizationsApiproductsGetCall) Context(ctx context.Context) *OrganizationsApiproductsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsGetProjectMappingCall) Header() http.Header { +func (c *OrganizationsApiproductsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsGetProjectMappingCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11269,7 +14710,7 @@ func (c *OrganizationsGetProjectMappingCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getProjectMapping") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -11282,16 +14723,14 @@ func (c *OrganizationsGetProjectMappingCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.getProjectMapping" call. -// Exactly one of *GoogleCloudApigeeV1OrganizationProjectMapping or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1OrganizationProjectMapping.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 *OrganizationsGetProjectMappingCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1OrganizationProjectMapping, error) { +// Do executes the "apigee.organizations.apiproducts.get" call. +// Exactly one of *GoogleCloudApigeeV1ApiProduct or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1ApiProduct.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 *OrganizationsApiproductsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProduct, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11310,7 +14749,7 @@ func (c *OrganizationsGetProjectMappingCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1OrganizationProjectMapping{ + ret := &GoogleCloudApigeeV1ApiProduct{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11322,25 +14761,25 @@ func (c *OrganizationsGetProjectMappingCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the project ID and region for an Apigee organization.", - // "flatPath": "v1/organizations/{organizationsId}:getProjectMapping", + // "description": "Gets configuration details for an API product. The API product name required in the request URL is the internal name of the product, not the display name. While they may be the same, it depends on whether the API product was created via the UI or the API. View the list of API products to verify the internal name.", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}", // "httpMethod": "GET", - // "id": "apigee.organizations.getProjectMapping", + // "id": "apigee.organizations.apiproducts.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Apigee organization name in the following format: `organizations/{org}`", + // "description": "Required. Name of the API product. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/apiproducts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:getProjectMapping", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1OrganizationProjectMapping" + // "$ref": "GoogleCloudApigeeV1ApiProduct" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11349,31 +14788,75 @@ func (c *OrganizationsGetProjectMappingCall) Do(opts ...googleapi.CallOption) (* } -// method id "apigee.organizations.getRuntimeConfig": +// method id "apigee.organizations.apiproducts.list": -type OrganizationsGetRuntimeConfigCall struct { +type OrganizationsApiproductsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetRuntimeConfig: Get runtime config for an organization. +// List: Lists all API product names for an organization. Filter the +// list by passing an `attributename` and `attibutevalue`. The maximum +// number of API products returned is 1000. You can paginate the list of +// API products returned using the `startKey` and `count` query +// parameters. // -// - name: Name of the runtime config for the organization in the -// following format: 'organizations/{org}/runtimeConfig'. -func (r *OrganizationsService) GetRuntimeConfig(name string) *OrganizationsGetRuntimeConfigCall { - c := &OrganizationsGetRuntimeConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the organization. Use the following structure in +// your request: `organizations/{org}`. +func (r *OrganizationsApiproductsService) List(parent string) *OrganizationsApiproductsListCall { + c := &OrganizationsApiproductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Attributename sets the optional parameter "attributename": Name of +// the attribute used to filter the search. +func (c *OrganizationsApiproductsListCall) Attributename(attributename string) *OrganizationsApiproductsListCall { + c.urlParams_.Set("attributename", attributename) + return c +} + +// Attributevalue sets the optional parameter "attributevalue": Value of +// the attribute used to filter the search. +func (c *OrganizationsApiproductsListCall) Attributevalue(attributevalue string) *OrganizationsApiproductsListCall { + c.urlParams_.Set("attributevalue", attributevalue) + return c +} + +// Count sets the optional parameter "count": Enter the number of API +// products you want returned in the API call. The limit is 1000. +func (c *OrganizationsApiproductsListCall) Count(count int64) *OrganizationsApiproductsListCall { + c.urlParams_.Set("count", fmt.Sprint(count)) + return c +} + +// Expand sets the optional parameter "expand": Flag that specifies +// whether to expand the results. Set to `true` to get expanded details +// about each API. +func (c *OrganizationsApiproductsListCall) Expand(expand bool) *OrganizationsApiproductsListCall { + c.urlParams_.Set("expand", fmt.Sprint(expand)) + return c +} + +// StartKey sets the optional parameter "startKey": Gets a list of API +// products starting with a specific API product in the list. For +// example, if you're returning 50 API products at a time (using the +// `count` query parameter), you can view products 50-99 by entering the +// name of the 50th API product in the first API (without using +// `startKey`). Product name is case sensitive. +func (c *OrganizationsApiproductsListCall) StartKey(startKey string) *OrganizationsApiproductsListCall { + c.urlParams_.Set("startKey", startKey) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsGetRuntimeConfigCall) Fields(s ...googleapi.Field) *OrganizationsGetRuntimeConfigCall { +func (c *OrganizationsApiproductsListCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11383,7 +14866,7 @@ func (c *OrganizationsGetRuntimeConfigCall) Fields(s ...googleapi.Field) *Organi // 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 *OrganizationsGetRuntimeConfigCall) IfNoneMatch(entityTag string) *OrganizationsGetRuntimeConfigCall { +func (c *OrganizationsApiproductsListCall) IfNoneMatch(entityTag string) *OrganizationsApiproductsListCall { c.ifNoneMatch_ = entityTag return c } @@ -11391,21 +14874,21 @@ func (c *OrganizationsGetRuntimeConfigCall) IfNoneMatch(entityTag string) *Organ // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsGetRuntimeConfigCall) Context(ctx context.Context) *OrganizationsGetRuntimeConfigCall { +func (c *OrganizationsApiproductsListCall) Context(ctx context.Context) *OrganizationsApiproductsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsGetRuntimeConfigCall) Header() http.Header { +func (c *OrganizationsApiproductsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsGetRuntimeConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11418,7 +14901,7 @@ func (c *OrganizationsGetRuntimeConfigCall) doRequest(alt string) (*http.Respons var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apiproducts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -11426,19 +14909,21 @@ func (c *OrganizationsGetRuntimeConfigCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.getRuntimeConfig" call. -// Exactly one of *GoogleCloudApigeeV1RuntimeConfig or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1RuntimeConfig.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 *OrganizationsGetRuntimeConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1RuntimeConfig, error) { +// Do executes the "apigee.organizations.apiproducts.list" call. +// Exactly one of *GoogleCloudApigeeV1ListApiProductsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListApiProductsResponse.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 *OrganizationsApiproductsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListApiProductsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11457,7 +14942,7 @@ func (c *OrganizationsGetRuntimeConfigCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1RuntimeConfig{ + ret := &GoogleCloudApigeeV1ListApiProductsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11469,25 +14954,51 @@ func (c *OrganizationsGetRuntimeConfigCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Get runtime config for an organization.", - // "flatPath": "v1/organizations/{organizationsId}/runtimeConfig", + // "description": "Lists all API product names for an organization. Filter the list by passing an `attributename` and `attibutevalue`. The maximum number of API products returned is 1000. You can paginate the list of API products returned using the `startKey` and `count` query parameters.", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts", // "httpMethod": "GET", - // "id": "apigee.organizations.getRuntimeConfig", + // "id": "apigee.organizations.apiproducts.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the runtime config for the organization in the following format: 'organizations/{org}/runtimeConfig'.", + // "attributename": { + // "description": "Name of the attribute used to filter the search.", + // "location": "query", + // "type": "string" + // }, + // "attributevalue": { + // "description": "Value of the attribute used to filter the search.", + // "location": "query", + // "type": "string" + // }, + // "count": { + // "description": "Enter the number of API products you want returned in the API call. The limit is 1000.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "expand": { + // "description": "Flag that specifies whether to expand the results. Set to `true` to get expanded details about each API.", + // "location": "query", + // "type": "boolean" + // }, + // "parent": { + // "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}`", // "location": "path", - // "pattern": "^organizations/[^/]+/runtimeConfig$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" + // }, + // "startKey": { + // "description": "Gets a list of API products starting with a specific API product in the list. For example, if you're returning 50 API products at a time (using the `count` query parameter), you can view products 50-99 by entering the name of the 50th API product in the first API (without using `startKey`). Product name is case sensitive.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/apiproducts", // "response": { - // "$ref": "GoogleCloudApigeeV1RuntimeConfig" + // "$ref": "GoogleCloudApigeeV1ListApiProductsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11496,42 +15007,38 @@ func (c *OrganizationsGetRuntimeConfigCall) Do(opts ...googleapi.CallOption) (*G } -// method id "apigee.organizations.getSyncAuthorization": +// method id "apigee.organizations.apiproducts.update": -type OrganizationsGetSyncAuthorizationCall struct { - s *Service - name string - googlecloudapigeev1getsyncauthorizationrequest *GoogleCloudApigeeV1GetSyncAuthorizationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApiproductsUpdateCall struct { + s *Service + name string + googlecloudapigeev1apiproduct *GoogleCloudApigeeV1ApiProduct + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetSyncAuthorization: Lists the service accounts with the permissions -// required to allow the Synchronizer to download environment data from -// the control plane. An ETag is returned in the response to -// `getSyncAuthorization`. Pass that ETag when calling -// setSyncAuthorization (setSyncAuthorization) to ensure that you are -// updating the correct version. If you don't pass the ETag in the call -// to `setSyncAuthorization`, then the existing authorization is -// overwritten indiscriminately. For more information, see Configure the -// Synchronizer -// (https://cloud.google.com/apigee/docs/hybrid/latest/synchronizer-access). -// **Note**: Available to Apigee hybrid only. +// Update: Updates an existing API product. You must include all +// required values, whether or not you are updating them, as well as any +// optional values that you are updating. The API product name required +// in the request URL is the internal name of the product, not the +// display name. While they may be the same, it depends on whether the +// API product was created via UI or API. View the list of API products +// to identify their internal names. // -// - name: Name of the Apigee organization. Use the following structure -// in your request: `organizations/{org}`. -func (r *OrganizationsService) GetSyncAuthorization(name string, googlecloudapigeev1getsyncauthorizationrequest *GoogleCloudApigeeV1GetSyncAuthorizationRequest) *OrganizationsGetSyncAuthorizationCall { - c := &OrganizationsGetSyncAuthorizationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the API product. Use the following structure in your +// request: `organizations/{org}/apiproducts/{apiproduct}`. +func (r *OrganizationsApiproductsService) Update(name string, googlecloudapigeev1apiproduct *GoogleCloudApigeeV1ApiProduct) *OrganizationsApiproductsUpdateCall { + c := &OrganizationsApiproductsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1getsyncauthorizationrequest = googlecloudapigeev1getsyncauthorizationrequest + c.googlecloudapigeev1apiproduct = googlecloudapigeev1apiproduct return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsGetSyncAuthorizationCall) Fields(s ...googleapi.Field) *OrganizationsGetSyncAuthorizationCall { +func (c *OrganizationsApiproductsUpdateCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11539,21 +15046,21 @@ func (c *OrganizationsGetSyncAuthorizationCall) Fields(s ...googleapi.Field) *Or // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsGetSyncAuthorizationCall) Context(ctx context.Context) *OrganizationsGetSyncAuthorizationCall { +func (c *OrganizationsApiproductsUpdateCall) Context(ctx context.Context) *OrganizationsApiproductsUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsGetSyncAuthorizationCall) Header() http.Header { +func (c *OrganizationsApiproductsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsGetSyncAuthorizationCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11561,16 +15068,16 @@ func (c *OrganizationsGetSyncAuthorizationCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1getsyncauthorizationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1apiproduct) 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, "v1/{+name}:getSyncAuthorization") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -11581,15 +15088,14 @@ func (c *OrganizationsGetSyncAuthorizationCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.getSyncAuthorization" call. -// Exactly one of *GoogleCloudApigeeV1SyncAuthorization or error will be +// Do executes the "apigee.organizations.apiproducts.update" call. +// Exactly one of *GoogleCloudApigeeV1ApiProduct or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1SyncAuthorization.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 *OrganizationsGetSyncAuthorizationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1SyncAuthorization, error) { +// either *GoogleCloudApigeeV1ApiProduct.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 *OrganizationsApiproductsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProduct, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11608,7 +15114,7 @@ func (c *OrganizationsGetSyncAuthorizationCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1SyncAuthorization{ + ret := &GoogleCloudApigeeV1ApiProduct{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11620,28 +15126,28 @@ func (c *OrganizationsGetSyncAuthorizationCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists the service accounts with the permissions required to allow the Synchronizer to download environment data from the control plane. An ETag is returned in the response to `getSyncAuthorization`. Pass that ETag when calling [setSyncAuthorization](setSyncAuthorization) to ensure that you are updating the correct version. If you don't pass the ETag in the call to `setSyncAuthorization`, then the existing authorization is overwritten indiscriminately. For more information, see [Configure the Synchronizer](https://cloud.google.com/apigee/docs/hybrid/latest/synchronizer-access). **Note**: Available to Apigee hybrid only.", - // "flatPath": "v1/organizations/{organizationsId}:getSyncAuthorization", - // "httpMethod": "POST", - // "id": "apigee.organizations.getSyncAuthorization", + // "description": "Updates an existing API product. You must include all required values, whether or not you are updating them, as well as any optional values that you are updating. The API product name required in the request URL is the internal name of the product, not the display name. While they may be the same, it depends on whether the API product was created via UI or API. View the list of API products to identify their internal names.", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}", + // "httpMethod": "PUT", + // "id": "apigee.organizations.apiproducts.update", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the Apigee organization. Use the following structure in your request: `organizations/{org}`", + // "description": "Required. Name of the API product. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/apiproducts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:getSyncAuthorization", + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudApigeeV1GetSyncAuthorizationRequest" + // "$ref": "GoogleCloudApigeeV1ApiProduct" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1SyncAuthorization" + // "$ref": "GoogleCloudApigeeV1ApiProduct" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11650,100 +15156,84 @@ func (c *OrganizationsGetSyncAuthorizationCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.list": +// method id "apigee.organizations.apiproducts.attributes.delete": -type OrganizationsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsApiproductsAttributesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the Apigee organizations and associated GCP projects that -// you have permission to access. See Understanding organizations -// (https://cloud.google.com/apigee/docs/api-platform/fundamentals/organization-structure). +// Delete: Deletes an API product attribute. // -// - parent: Use the following structure in your request: -// `organizations`. -func (r *OrganizationsService) List(parent string) *OrganizationsListCall { - c := &OrganizationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Name of the API product attribute. Use the following +// structure in your request: +// `organizations/{org}/apiproducts/{apiproduct}/attributes/{attribute} +// `. +func (r *OrganizationsApiproductsAttributesService) Delete(name string) *OrganizationsApiproductsAttributesDeleteCall { + c := &OrganizationsApiproductsAttributesDeleteCall{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 *OrganizationsListCall) Fields(s ...googleapi.Field) *OrganizationsListCall { +func (c *OrganizationsApiproductsAttributesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsAttributesDeleteCall { 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 *OrganizationsListCall) IfNoneMatch(entityTag string) *OrganizationsListCall { - 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 *OrganizationsListCall) Context(ctx context.Context) *OrganizationsListCall { +func (c *OrganizationsApiproductsAttributesDeleteCall) Context(ctx context.Context) *OrganizationsApiproductsAttributesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsListCall) Header() http.Header { +func (c *OrganizationsApiproductsAttributesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsAttributesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+parent}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.list" call. -// Exactly one of *GoogleCloudApigeeV1ListOrganizationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListOrganizationsResponse.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 *OrganizationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListOrganizationsResponse, error) { +// Do executes the "apigee.organizations.apiproducts.attributes.delete" call. +// Exactly one of *GoogleCloudApigeeV1Attribute or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Attribute.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 *OrganizationsApiproductsAttributesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11762,7 +15252,7 @@ func (c *OrganizationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListOrganizationsResponse{ + ret := &GoogleCloudApigeeV1Attribute{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11774,25 +15264,25 @@ func (c *OrganizationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAp } return ret, nil // { - // "description": "Lists the Apigee organizations and associated GCP projects that you have permission to access. See [Understanding organizations](https://cloud.google.com/apigee/docs/api-platform/fundamentals/organization-structure).", - // "flatPath": "v1/organizations", - // "httpMethod": "GET", - // "id": "apigee.organizations.list", + // "description": "Deletes an API product attribute.", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/attributes/{attributesId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.apiproducts.attributes.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Use the following structure in your request: `organizations`", + // "name": { + // "description": "Required. Name of the API product attribute. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}/attributes/{attribute}`", // "location": "path", - // "pattern": "^organizations$", + // "pattern": "^organizations/[^/]+/apiproducts/[^/]+/attributes/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListOrganizationsResponse" + // "$ref": "GoogleCloudApigeeV1Attribute" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11801,90 +15291,98 @@ func (c *OrganizationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAp } -// method id "apigee.organizations.setAddons": +// method id "apigee.organizations.apiproducts.attributes.get": -type OrganizationsSetAddonsCall struct { - s *Service - org string - googlecloudapigeev1setaddonsrequest *GoogleCloudApigeeV1SetAddonsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApiproductsAttributesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetAddons: Configures the add-ons for the Apigee organization. The -// existing add-on configuration will be fully replaced. +// Get: Gets the value of an API product attribute. // -// - org: Name of the organization. Use the following structure in your -// request: `organizations/{org}`. -func (r *OrganizationsService) SetAddons(org string, googlecloudapigeev1setaddonsrequest *GoogleCloudApigeeV1SetAddonsRequest) *OrganizationsSetAddonsCall { - c := &OrganizationsSetAddonsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.org = org - c.googlecloudapigeev1setaddonsrequest = googlecloudapigeev1setaddonsrequest +// - name: Name of the API product attribute. Use the following +// structure in your request: +// `organizations/{org}/apiproducts/{apiproduct}/attributes/{attribute} +// `. +func (r *OrganizationsApiproductsAttributesService) Get(name string) *OrganizationsApiproductsAttributesGetCall { + c := &OrganizationsApiproductsAttributesGetCall{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 *OrganizationsSetAddonsCall) Fields(s ...googleapi.Field) *OrganizationsSetAddonsCall { +func (c *OrganizationsApiproductsAttributesGetCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsAttributesGetCall { 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 *OrganizationsApiproductsAttributesGetCall) IfNoneMatch(entityTag string) *OrganizationsApiproductsAttributesGetCall { + 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 *OrganizationsSetAddonsCall) Context(ctx context.Context) *OrganizationsSetAddonsCall { +func (c *OrganizationsApiproductsAttributesGetCall) Context(ctx context.Context) *OrganizationsApiproductsAttributesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsSetAddonsCall) Header() http.Header { +func (c *OrganizationsApiproductsAttributesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSetAddonsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsAttributesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1setaddonsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+org}:setAddons") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "org": c.org, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.setAddons" 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 +// Do executes the "apigee.organizations.apiproducts.attributes.get" call. +// Exactly one of *GoogleCloudApigeeV1Attribute or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Attribute.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 *OrganizationsSetAddonsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsApiproductsAttributesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11903,7 +15401,7 @@ func (c *OrganizationsSetAddonsCall) Do(opts ...googleapi.CallOption) (*GoogleLo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1Attribute{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11915,28 +15413,25 @@ func (c *OrganizationsSetAddonsCall) Do(opts ...googleapi.CallOption) (*GoogleLo } return ret, nil // { - // "description": "Configures the add-ons for the Apigee organization. The existing add-on configuration will be fully replaced.", - // "flatPath": "v1/organizations/{organizationsId}:setAddons", - // "httpMethod": "POST", - // "id": "apigee.organizations.setAddons", + // "description": "Gets the value of an API product attribute.", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/attributes/{attributesId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.apiproducts.attributes.get", // "parameterOrder": [ - // "org" + // "name" // ], // "parameters": { - // "org": { - // "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}`", + // "name": { + // "description": "Required. Name of the API product attribute. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}/attributes/{attribute}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/apiproducts/[^/]+/attributes/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+org}:setAddons", - // "request": { - // "$ref": "GoogleCloudApigeeV1SetAddonsRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1Attribute" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11945,100 +15440,96 @@ func (c *OrganizationsSetAddonsCall) Do(opts ...googleapi.CallOption) (*GoogleLo } -// method id "apigee.organizations.setSyncAuthorization": +// method id "apigee.organizations.apiproducts.attributes.list": -type OrganizationsSetSyncAuthorizationCall struct { - s *Service - name string - googlecloudapigeev1syncauthorization *GoogleCloudApigeeV1SyncAuthorization - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApiproductsAttributesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetSyncAuthorization: Sets the permissions required to allow the -// Synchronizer to download environment data from the control plane. You -// must call this API to enable proper functioning of hybrid. Pass the -// ETag when calling `setSyncAuthorization` to ensure that you are -// updating the correct version. To get an ETag, call -// getSyncAuthorization (getSyncAuthorization). If you don't pass the -// ETag in the call to `setSyncAuthorization`, then the existing -// authorization is overwritten indiscriminately. For more information, -// see Configure the Synchronizer -// (https://cloud.google.com/apigee/docs/hybrid/latest/synchronizer-access). -// **Note**: Available to Apigee hybrid only. +// List: Lists all API product attributes. // -// - name: Name of the Apigee organization. Use the following structure -// in your request: `organizations/{org}`. -func (r *OrganizationsService) SetSyncAuthorization(name string, googlecloudapigeev1syncauthorization *GoogleCloudApigeeV1SyncAuthorization) *OrganizationsSetSyncAuthorizationCall { - c := &OrganizationsSetSyncAuthorizationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1syncauthorization = googlecloudapigeev1syncauthorization +// - parent: Name of the API product. Use the following structure in +// your request: `organizations/{org}/apiproducts/{apiproduct}`. +func (r *OrganizationsApiproductsAttributesService) List(parent string) *OrganizationsApiproductsAttributesListCall { + c := &OrganizationsApiproductsAttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsSetSyncAuthorizationCall) Fields(s ...googleapi.Field) *OrganizationsSetSyncAuthorizationCall { +func (c *OrganizationsApiproductsAttributesListCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsAttributesListCall { 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 *OrganizationsApiproductsAttributesListCall) IfNoneMatch(entityTag string) *OrganizationsApiproductsAttributesListCall { + 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 *OrganizationsSetSyncAuthorizationCall) Context(ctx context.Context) *OrganizationsSetSyncAuthorizationCall { +func (c *OrganizationsApiproductsAttributesListCall) Context(ctx context.Context) *OrganizationsApiproductsAttributesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsSetSyncAuthorizationCall) Header() http.Header { +func (c *OrganizationsApiproductsAttributesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSetSyncAuthorizationCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsAttributesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1syncauthorization) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setSyncAuthorization") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.setSyncAuthorization" call. -// Exactly one of *GoogleCloudApigeeV1SyncAuthorization or error will be +// Do executes the "apigee.organizations.apiproducts.attributes.list" call. +// Exactly one of *GoogleCloudApigeeV1Attributes or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1SyncAuthorization.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 *OrganizationsSetSyncAuthorizationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1SyncAuthorization, error) { +// either *GoogleCloudApigeeV1Attributes.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 *OrganizationsApiproductsAttributesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attributes, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12057,7 +15548,7 @@ func (c *OrganizationsSetSyncAuthorizationCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1SyncAuthorization{ + ret := &GoogleCloudApigeeV1Attributes{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12069,28 +15560,25 @@ func (c *OrganizationsSetSyncAuthorizationCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the permissions required to allow the Synchronizer to download environment data from the control plane. You must call this API to enable proper functioning of hybrid. Pass the ETag when calling `setSyncAuthorization` to ensure that you are updating the correct version. To get an ETag, call [getSyncAuthorization](getSyncAuthorization). If you don't pass the ETag in the call to `setSyncAuthorization`, then the existing authorization is overwritten indiscriminately. For more information, see [Configure the Synchronizer](https://cloud.google.com/apigee/docs/hybrid/latest/synchronizer-access). **Note**: Available to Apigee hybrid only.", - // "flatPath": "v1/organizations/{organizationsId}:setSyncAuthorization", - // "httpMethod": "POST", - // "id": "apigee.organizations.setSyncAuthorization", + // "description": "Lists all API product attributes.", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/attributes", + // "httpMethod": "GET", + // "id": "apigee.organizations.apiproducts.attributes.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the Apigee organization. Use the following structure in your request: `organizations/{org}`", + // "parent": { + // "description": "Required. Name of the API product. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/apiproducts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:setSyncAuthorization", - // "request": { - // "$ref": "GoogleCloudApigeeV1SyncAuthorization" - // }, + // "path": "v1/{+parent}/attributes", // "response": { - // "$ref": "GoogleCloudApigeeV1SyncAuthorization" + // "$ref": "GoogleCloudApigeeV1Attributes" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12099,33 +15587,39 @@ func (c *OrganizationsSetSyncAuthorizationCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.update": +// method id "apigee.organizations.apiproducts.attributes.updateApiProductAttribute": -type OrganizationsUpdateCall struct { - s *Service - name string - googlecloudapigeev1organization *GoogleCloudApigeeV1Organization - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApiproductsAttributesUpdateApiProductAttributeCall struct { + s *Service + name string + googlecloudapigeev1attribute *GoogleCloudApigeeV1Attribute + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates the properties for an Apigee organization. No other -// fields in the organization profile will be updated. +// UpdateApiProductAttribute: Updates the value of an API product +// attribute. **Note**: OAuth access tokens and Key Management Service +// (KMS) entities (apps, developers, and API products) are cached for +// 180 seconds (current default). Any custom attributes associated with +// entities also get cached for at least 180 seconds after entity is +// accessed during runtime. In this case, the `ExpiresIn` element on the +// OAuthV2 policy won't be able to expire an access token in less than +// 180 seconds. // -// - name: Apigee organization name in the following format: -// `organizations/{org}`. -func (r *OrganizationsService) Update(name string, googlecloudapigeev1organization *GoogleCloudApigeeV1Organization) *OrganizationsUpdateCall { - c := &OrganizationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the API product. Use the following structure in your +// request: `organizations/{org}/apiproducts/{apiproduct}`. +func (r *OrganizationsApiproductsAttributesService) UpdateApiProductAttribute(name string, googlecloudapigeev1attribute *GoogleCloudApigeeV1Attribute) *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall { + c := &OrganizationsApiproductsAttributesUpdateApiProductAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1organization = googlecloudapigeev1organization + c.googlecloudapigeev1attribute = googlecloudapigeev1attribute return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsUpdateCall) Fields(s ...googleapi.Field) *OrganizationsUpdateCall { +func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12133,21 +15627,21 @@ func (c *OrganizationsUpdateCall) Fields(s ...googleapi.Field) *OrganizationsUpd // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsUpdateCall) Context(ctx context.Context) *OrganizationsUpdateCall { +func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) Context(ctx context.Context) *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsUpdateCall) Header() http.Header { +func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12155,7 +15649,7 @@ func (c *OrganizationsUpdateCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1organization) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1attribute) if err != nil { return nil, err } @@ -12164,7 +15658,7 @@ func (c *OrganizationsUpdateCall) doRequest(alt string) (*http.Response, error) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -12175,14 +15669,14 @@ func (c *OrganizationsUpdateCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.update" call. -// Exactly one of *GoogleCloudApigeeV1Organization or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Organization.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 +// Do executes the "apigee.organizations.apiproducts.attributes.updateApiProductAttribute" call. +// Exactly one of *GoogleCloudApigeeV1Attribute or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Attribute.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 *OrganizationsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Organization, error) { +func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12201,7 +15695,7 @@ func (c *OrganizationsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloud if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Organization{ + ret := &GoogleCloudApigeeV1Attribute{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12213,28 +15707,28 @@ func (c *OrganizationsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloud } return ret, nil // { - // "description": "Updates the properties for an Apigee organization. No other fields in the organization profile will be updated.", - // "flatPath": "v1/organizations/{organizationsId}", - // "httpMethod": "PUT", - // "id": "apigee.organizations.update", + // "description": "Updates the value of an API product attribute. **Note**: OAuth access tokens and Key Management Service (KMS) entities (apps, developers, and API products) are cached for 180 seconds (current default). Any custom attributes associated with entities also get cached for at least 180 seconds after entity is accessed during runtime. In this case, the `ExpiresIn` element on the OAuthV2 policy won't be able to expire an access token in less than 180 seconds.", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/attributes/{attributesId}", + // "httpMethod": "POST", + // "id": "apigee.organizations.apiproducts.attributes.updateApiProductAttribute", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Apigee organization name in the following format: `organizations/{org}`", + // "description": "Required. Name of the API product. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/apiproducts/[^/]+/attributes/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudApigeeV1Organization" + // "$ref": "GoogleCloudApigeeV1Attribute" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Organization" + // "$ref": "GoogleCloudApigeeV1Attribute" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12243,32 +15737,42 @@ func (c *OrganizationsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloud } -// method id "apigee.organizations.analytics.datastores.create": +// method id "apigee.organizations.apiproducts.rateplans.create": -type OrganizationsAnalyticsDatastoresCreateCall struct { - s *Service - parent string - googlecloudapigeev1datastore *GoogleCloudApigeeV1Datastore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApiproductsRateplansCreateCall struct { + s *Service + parent string + googlecloudapigeev1rateplan *GoogleCloudApigeeV1RatePlan + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Create a Datastore for an org +// Create: Create a rate plan that is associated with an API product in +// an organization. Using rate plans, API product owners can monetize +// their API products by configuring one or more of the following: - +// Billing frequency - Initial setup fees for using an API product - +// Payment funding model (postpaid only) - Fixed recurring or +// consumption-based charges for using an API product - Revenue sharing +// with developer partners An API product can have multiple rate plans +// associated with it but *only one* rate plan can be active at any +// point of time. **Note: From the developer's perspective, they +// purchase API products not rate plans. // -// - parent: The parent organization name. Must be of the form -// `organizations/{org}`. -func (r *OrganizationsAnalyticsDatastoresService) Create(parent string, googlecloudapigeev1datastore *GoogleCloudApigeeV1Datastore) *OrganizationsAnalyticsDatastoresCreateCall { - c := &OrganizationsAnalyticsDatastoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the API product that is associated with the rate +// plan. Use the following structure in your request: +// `organizations/{org}/apiproducts/{apiproduct}`. +func (r *OrganizationsApiproductsRateplansService) Create(parent string, googlecloudapigeev1rateplan *GoogleCloudApigeeV1RatePlan) *OrganizationsApiproductsRateplansCreateCall { + c := &OrganizationsApiproductsRateplansCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1datastore = googlecloudapigeev1datastore + c.googlecloudapigeev1rateplan = googlecloudapigeev1rateplan return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsAnalyticsDatastoresCreateCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsDatastoresCreateCall { +func (c *OrganizationsApiproductsRateplansCreateCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsRateplansCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12276,21 +15780,21 @@ func (c *OrganizationsAnalyticsDatastoresCreateCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsAnalyticsDatastoresCreateCall) Context(ctx context.Context) *OrganizationsAnalyticsDatastoresCreateCall { +func (c *OrganizationsApiproductsRateplansCreateCall) Context(ctx context.Context) *OrganizationsApiproductsRateplansCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsAnalyticsDatastoresCreateCall) Header() http.Header { +func (c *OrganizationsApiproductsRateplansCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsAnalyticsDatastoresCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsRateplansCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12298,14 +15802,14 @@ func (c *OrganizationsAnalyticsDatastoresCreateCall) doRequest(alt string) (*htt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1datastore) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1rateplan) 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, "v1/{+parent}/analytics/datastores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rateplans") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -12318,14 +15822,14 @@ func (c *OrganizationsAnalyticsDatastoresCreateCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.analytics.datastores.create" call. -// Exactly one of *GoogleCloudApigeeV1Datastore or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Datastore.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.apiproducts.rateplans.create" call. +// Exactly one of *GoogleCloudApigeeV1RatePlan or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1RatePlan.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 *OrganizationsAnalyticsDatastoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Datastore, error) { +func (c *OrganizationsApiproductsRateplansCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1RatePlan, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12344,7 +15848,7 @@ func (c *OrganizationsAnalyticsDatastoresCreateCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Datastore{ + ret := &GoogleCloudApigeeV1RatePlan{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12356,28 +15860,28 @@ func (c *OrganizationsAnalyticsDatastoresCreateCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Create a Datastore for an org", - // "flatPath": "v1/organizations/{organizationsId}/analytics/datastores", + // "description": "Create a rate plan that is associated with an API product in an organization. Using rate plans, API product owners can monetize their API products by configuring one or more of the following: - Billing frequency - Initial setup fees for using an API product - Payment funding model (postpaid only) - Fixed recurring or consumption-based charges for using an API product - Revenue sharing with developer partners An API product can have multiple rate plans associated with it but *only one* rate plan can be active at any point of time. **Note: From the developer's perspective, they purchase API products not rate plans.", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/rateplans", // "httpMethod": "POST", - // "id": "apigee.organizations.analytics.datastores.create", + // "id": "apigee.organizations.apiproducts.rateplans.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The parent organization name. Must be of the form `organizations/{org}`.", + // "description": "Required. Name of the API product that is associated with the rate plan. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/apiproducts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/analytics/datastores", + // "path": "v1/{+parent}/rateplans", // "request": { - // "$ref": "GoogleCloudApigeeV1Datastore" + // "$ref": "GoogleCloudApigeeV1RatePlan" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Datastore" + // "$ref": "GoogleCloudApigeeV1RatePlan" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12386,9 +15890,9 @@ func (c *OrganizationsAnalyticsDatastoresCreateCall) Do(opts ...googleapi.CallOp } -// method id "apigee.organizations.analytics.datastores.delete": +// method id "apigee.organizations.apiproducts.rateplans.delete": -type OrganizationsAnalyticsDatastoresDeleteCall struct { +type OrganizationsApiproductsRateplansDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12396,12 +15900,13 @@ type OrganizationsAnalyticsDatastoresDeleteCall struct { header_ http.Header } -// Delete: Delete a Datastore from an org. +// Delete: Deletes a rate plan. // -// - name: Resource name of the Datastore to be deleted. Must be of the -// form `organizations/{org}/analytics/datastores/{datastoreId}`. -func (r *OrganizationsAnalyticsDatastoresService) Delete(name string) *OrganizationsAnalyticsDatastoresDeleteCall { - c := &OrganizationsAnalyticsDatastoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: ID of the rate plan. Use the following structure in your +// request: +// `organizations/{org}/apiproducts/{apiproduct}/rateplans/{rateplan}`. +func (r *OrganizationsApiproductsRateplansService) Delete(name string) *OrganizationsApiproductsRateplansDeleteCall { + c := &OrganizationsApiproductsRateplansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -12409,7 +15914,7 @@ func (r *OrganizationsAnalyticsDatastoresService) Delete(name string) *Organizat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsAnalyticsDatastoresDeleteCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsDatastoresDeleteCall { +func (c *OrganizationsApiproductsRateplansDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsRateplansDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12417,21 +15922,21 @@ func (c *OrganizationsAnalyticsDatastoresDeleteCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsAnalyticsDatastoresDeleteCall) Context(ctx context.Context) *OrganizationsAnalyticsDatastoresDeleteCall { +func (c *OrganizationsApiproductsRateplansDeleteCall) Context(ctx context.Context) *OrganizationsApiproductsRateplansDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsAnalyticsDatastoresDeleteCall) Header() http.Header { +func (c *OrganizationsApiproductsRateplansDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsAnalyticsDatastoresDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsRateplansDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12454,14 +15959,14 @@ func (c *OrganizationsAnalyticsDatastoresDeleteCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.analytics.datastores.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 +// Do executes the "apigee.organizations.apiproducts.rateplans.delete" call. +// Exactly one of *GoogleCloudApigeeV1RatePlan or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1RatePlan.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 *OrganizationsAnalyticsDatastoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsApiproductsRateplansDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1RatePlan, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12480,7 +15985,7 @@ func (c *OrganizationsAnalyticsDatastoresDeleteCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudApigeeV1RatePlan{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12492,25 +15997,25 @@ func (c *OrganizationsAnalyticsDatastoresDeleteCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Delete a Datastore from an org.", - // "flatPath": "v1/organizations/{organizationsId}/analytics/datastores/{datastoresId}", + // "description": "Deletes a rate plan.", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/rateplans/{rateplansId}", // "httpMethod": "DELETE", - // "id": "apigee.organizations.analytics.datastores.delete", + // "id": "apigee.organizations.apiproducts.rateplans.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the Datastore to be deleted. Must be of the form `organizations/{org}/analytics/datastores/{datastoreId}`", + // "description": "Required. ID of the rate plan. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}/rateplans/{rateplan}`", // "location": "path", - // "pattern": "^organizations/[^/]+/analytics/datastores/[^/]+$", + // "pattern": "^organizations/[^/]+/apiproducts/[^/]+/rateplans/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudApigeeV1RatePlan" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12519,9 +16024,9 @@ func (c *OrganizationsAnalyticsDatastoresDeleteCall) Do(opts ...googleapi.CallOp } -// method id "apigee.organizations.analytics.datastores.get": +// method id "apigee.organizations.apiproducts.rateplans.get": -type OrganizationsAnalyticsDatastoresGetCall struct { +type OrganizationsApiproductsRateplansGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12530,12 +16035,13 @@ type OrganizationsAnalyticsDatastoresGetCall struct { header_ http.Header } -// Get: Get a Datastore +// Get: Gets the details of a rate plan. // -// - name: Resource name of the Datastore to be get. Must be of the form -// `organizations/{org}/analytics/datastores/{datastoreId}`. -func (r *OrganizationsAnalyticsDatastoresService) Get(name string) *OrganizationsAnalyticsDatastoresGetCall { - c := &OrganizationsAnalyticsDatastoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the rate plan. Use the following structure in your +// request: +// `organizations/{org}/apiproducts/{apiproduct}/rateplans/{rateplan}`. +func (r *OrganizationsApiproductsRateplansService) Get(name string) *OrganizationsApiproductsRateplansGetCall { + c := &OrganizationsApiproductsRateplansGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -12543,7 +16049,7 @@ func (r *OrganizationsAnalyticsDatastoresService) Get(name string) *Organization // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsAnalyticsDatastoresGetCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsDatastoresGetCall { +func (c *OrganizationsApiproductsRateplansGetCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsRateplansGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12553,7 +16059,7 @@ func (c *OrganizationsAnalyticsDatastoresGetCall) Fields(s ...googleapi.Field) * // 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 *OrganizationsAnalyticsDatastoresGetCall) IfNoneMatch(entityTag string) *OrganizationsAnalyticsDatastoresGetCall { +func (c *OrganizationsApiproductsRateplansGetCall) IfNoneMatch(entityTag string) *OrganizationsApiproductsRateplansGetCall { c.ifNoneMatch_ = entityTag return c } @@ -12561,21 +16067,21 @@ func (c *OrganizationsAnalyticsDatastoresGetCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsAnalyticsDatastoresGetCall) Context(ctx context.Context) *OrganizationsAnalyticsDatastoresGetCall { +func (c *OrganizationsApiproductsRateplansGetCall) Context(ctx context.Context) *OrganizationsApiproductsRateplansGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsAnalyticsDatastoresGetCall) Header() http.Header { +func (c *OrganizationsApiproductsRateplansGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsAnalyticsDatastoresGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsRateplansGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12601,14 +16107,14 @@ func (c *OrganizationsAnalyticsDatastoresGetCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.analytics.datastores.get" call. -// Exactly one of *GoogleCloudApigeeV1Datastore or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Datastore.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.apiproducts.rateplans.get" call. +// Exactly one of *GoogleCloudApigeeV1RatePlan or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1RatePlan.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 *OrganizationsAnalyticsDatastoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Datastore, error) { +func (c *OrganizationsApiproductsRateplansGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1RatePlan, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12627,7 +16133,7 @@ func (c *OrganizationsAnalyticsDatastoresGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Datastore{ + ret := &GoogleCloudApigeeV1RatePlan{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12639,25 +16145,25 @@ func (c *OrganizationsAnalyticsDatastoresGetCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Get a Datastore", - // "flatPath": "v1/organizations/{organizationsId}/analytics/datastores/{datastoresId}", + // "description": "Gets the details of a rate plan.", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/rateplans/{rateplansId}", // "httpMethod": "GET", - // "id": "apigee.organizations.analytics.datastores.get", + // "id": "apigee.organizations.apiproducts.rateplans.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the Datastore to be get. Must be of the form `organizations/{org}/analytics/datastores/{datastoreId}`", + // "description": "Required. Name of the rate plan. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}/rateplans/{rateplan}`", // "location": "path", - // "pattern": "^organizations/[^/]+/analytics/datastores/[^/]+$", + // "pattern": "^organizations/[^/]+/apiproducts/[^/]+/rateplans/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Datastore" + // "$ref": "GoogleCloudApigeeV1RatePlan" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12666,9 +16172,9 @@ func (c *OrganizationsAnalyticsDatastoresGetCall) Do(opts ...googleapi.CallOptio } -// method id "apigee.organizations.analytics.datastores.list": +// method id "apigee.organizations.apiproducts.rateplans.list": -type OrganizationsAnalyticsDatastoresListCall struct { +type OrganizationsApiproductsRateplansListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -12677,27 +16183,74 @@ type OrganizationsAnalyticsDatastoresListCall struct { header_ http.Header } -// List: List Datastores +// List: Lists all the rate plans for an API product. // -// - parent: The parent organization name. Must be of the form -// `organizations/{org}`. -func (r *OrganizationsAnalyticsDatastoresService) List(parent string) *OrganizationsAnalyticsDatastoresListCall { - c := &OrganizationsAnalyticsDatastoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the API product. Use the following structure in +// your request: `organizations/{org}/apiproducts/{apiproduct}` Use +// `organizations/{org}/apiproducts/-` to return rate plans for all +// API products within the organization. +func (r *OrganizationsApiproductsRateplansService) List(parent string) *OrganizationsApiproductsRateplansListCall { + c := &OrganizationsApiproductsRateplansListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// TargetType sets the optional parameter "targetType": TargetType is -// used to fetch all Datastores that match the type -func (c *OrganizationsAnalyticsDatastoresListCall) TargetType(targetType string) *OrganizationsAnalyticsDatastoresListCall { - c.urlParams_.Set("targetType", targetType) +// Count sets the optional parameter "count": Number of rate plans to +// return in the API call. Use with the `startKey` parameter to provide +// more targeted filtering. The maximum limit is 1000. Defaults to 100. +func (c *OrganizationsApiproductsRateplansListCall) Count(count int64) *OrganizationsApiproductsRateplansListCall { + c.urlParams_.Set("count", fmt.Sprint(count)) + return c +} + +// Expand sets the optional parameter "expand": Flag that specifies +// whether to expand the results. Set to `true` to get expanded details +// about each API. Defaults to `false`. +func (c *OrganizationsApiproductsRateplansListCall) Expand(expand bool) *OrganizationsApiproductsRateplansListCall { + c.urlParams_.Set("expand", fmt.Sprint(expand)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Name of the attribute +// used for sorting. Valid values include: * `name`: Name of the rate +// plan. * `state`: State of the rate plan (`DRAFT`, `PUBLISHED`). * +// `startTime`: Time when the rate plan becomes active. * `endTime`: +// Time when the rate plan expires. **Note**: Not supported by Apigee at +// this time. +func (c *OrganizationsApiproductsRateplansListCall) OrderBy(orderBy string) *OrganizationsApiproductsRateplansListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// StartKey sets the optional parameter "startKey": Name of the rate +// plan from which to start displaying the list of rate plans. If +// omitted, the list starts from the first item. For example, to view +// the rate plans from 51-150, set the value of `startKey` to the name +// of the 51st rate plan and set the value of `count` to 100. +func (c *OrganizationsApiproductsRateplansListCall) StartKey(startKey string) *OrganizationsApiproductsRateplansListCall { + c.urlParams_.Set("startKey", startKey) + return c +} + +// State sets the optional parameter "state": State of the rate plans +// (`DRAFT`, `PUBLISHED`) that you want to display. +// +// Possible values: +// "STATE_UNSPECIFIED" - State of the rate plan is not specified. +// "DRAFT" - Rate plan is in draft mode and only visible to API +// providers. +// "PUBLISHED" - Rate plan is published and will become visible to +// developers for the configured duration (between `startTime` and +// `endTime`). +func (c *OrganizationsApiproductsRateplansListCall) State(state string) *OrganizationsApiproductsRateplansListCall { + c.urlParams_.Set("state", state) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsAnalyticsDatastoresListCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsDatastoresListCall { +func (c *OrganizationsApiproductsRateplansListCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsRateplansListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12707,7 +16260,7 @@ func (c *OrganizationsAnalyticsDatastoresListCall) Fields(s ...googleapi.Field) // 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 *OrganizationsAnalyticsDatastoresListCall) IfNoneMatch(entityTag string) *OrganizationsAnalyticsDatastoresListCall { +func (c *OrganizationsApiproductsRateplansListCall) IfNoneMatch(entityTag string) *OrganizationsApiproductsRateplansListCall { c.ifNoneMatch_ = entityTag return c } @@ -12715,21 +16268,21 @@ func (c *OrganizationsAnalyticsDatastoresListCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsAnalyticsDatastoresListCall) Context(ctx context.Context) *OrganizationsAnalyticsDatastoresListCall { +func (c *OrganizationsApiproductsRateplansListCall) Context(ctx context.Context) *OrganizationsApiproductsRateplansListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsAnalyticsDatastoresListCall) Header() http.Header { +func (c *OrganizationsApiproductsRateplansListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsAnalyticsDatastoresListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsRateplansListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12742,7 +16295,7 @@ func (c *OrganizationsAnalyticsDatastoresListCall) doRequest(alt string) (*http. var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/analytics/datastores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rateplans") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -12755,16 +16308,16 @@ func (c *OrganizationsAnalyticsDatastoresListCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.analytics.datastores.list" call. -// Exactly one of *GoogleCloudApigeeV1ListDatastoresResponse or error +// Do executes the "apigee.organizations.apiproducts.rateplans.list" call. +// Exactly one of *GoogleCloudApigeeV1ListRatePlansResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudApigeeV1ListDatastoresResponse.ServerResponse.Header or +// *GoogleCloudApigeeV1ListRatePlansResponse.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 *OrganizationsAnalyticsDatastoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDatastoresResponse, error) { +func (c *OrganizationsApiproductsRateplansListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListRatePlansResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12783,7 +16336,7 @@ func (c *OrganizationsAnalyticsDatastoresListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListDatastoresResponse{ + ret := &GoogleCloudApigeeV1ListRatePlansResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12795,177 +16348,61 @@ func (c *OrganizationsAnalyticsDatastoresListCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "List Datastores", - // "flatPath": "v1/organizations/{organizationsId}/analytics/datastores", + // "description": "Lists all the rate plans for an API product.", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/rateplans", // "httpMethod": "GET", - // "id": "apigee.organizations.analytics.datastores.list", + // "id": "apigee.organizations.apiproducts.rateplans.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "count": { + // "description": "Number of rate plans to return in the API call. Use with the `startKey` parameter to provide more targeted filtering. The maximum limit is 1000. Defaults to 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "expand": { + // "description": "Flag that specifies whether to expand the results. Set to `true` to get expanded details about each API. Defaults to `false`.", + // "location": "query", + // "type": "boolean" + // }, + // "orderBy": { + // "description": "Name of the attribute used for sorting. Valid values include: * `name`: Name of the rate plan. * `state`: State of the rate plan (`DRAFT`, `PUBLISHED`). * `startTime`: Time when the rate plan becomes active. * `endTime`: Time when the rate plan expires. **Note**: Not supported by Apigee at this time.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. The parent organization name. Must be of the form `organizations/{org}`.", + // "description": "Required. Name of the API product. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}` Use `organizations/{org}/apiproducts/-` to return rate plans for all API products within the organization.", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/apiproducts/[^/]+$", // "required": true, // "type": "string" // }, - // "targetType": { - // "description": "Optional. TargetType is used to fetch all Datastores that match the type", + // "startKey": { + // "description": "Name of the rate plan from which to start displaying the list of rate plans. If omitted, the list starts from the first item. For example, to view the rate plans from 51-150, set the value of `startKey` to the name of the 51st rate plan and set the value of `count` to 100.", // "location": "query", // "type": "string" - // } - // }, - // "path": "v1/{+parent}/analytics/datastores", - // "response": { - // "$ref": "GoogleCloudApigeeV1ListDatastoresResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "apigee.organizations.analytics.datastores.test": - -type OrganizationsAnalyticsDatastoresTestCall struct { - s *Service - parent string - googlecloudapigeev1datastore *GoogleCloudApigeeV1Datastore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Test: Test if Datastore configuration is correct. This includes -// checking if credentials provided by customer have required -// permissions in target destination storage -// -// - parent: The parent organization name Must be of the form -// `organizations/{org}`. -func (r *OrganizationsAnalyticsDatastoresService) Test(parent string, googlecloudapigeev1datastore *GoogleCloudApigeeV1Datastore) *OrganizationsAnalyticsDatastoresTestCall { - c := &OrganizationsAnalyticsDatastoresTestCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1datastore = googlecloudapigeev1datastore - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *OrganizationsAnalyticsDatastoresTestCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsDatastoresTestCall { - 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 *OrganizationsAnalyticsDatastoresTestCall) Context(ctx context.Context) *OrganizationsAnalyticsDatastoresTestCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *OrganizationsAnalyticsDatastoresTestCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsAnalyticsDatastoresTestCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - 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.googlecloudapigeev1datastore) - 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, "v1/{+parent}/analytics/datastores:test") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - 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 "apigee.organizations.analytics.datastores.test" call. -// Exactly one of *GoogleCloudApigeeV1TestDatastoreResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1TestDatastoreResponse.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 *OrganizationsAnalyticsDatastoresTestCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TestDatastoreResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudApigeeV1TestDatastoreResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Test if Datastore configuration is correct. This includes checking if credentials provided by customer have required permissions in target destination storage", - // "flatPath": "v1/organizations/{organizationsId}/analytics/datastores:test", - // "httpMethod": "POST", - // "id": "apigee.organizations.analytics.datastores.test", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The parent organization name Must be of the form `organizations/{org}`", - // "location": "path", - // "pattern": "^organizations/[^/]+$", - // "required": true, + // }, + // "state": { + // "description": "State of the rate plans (`DRAFT`, `PUBLISHED`) that you want to display.", + // "enum": [ + // "STATE_UNSPECIFIED", + // "DRAFT", + // "PUBLISHED" + // ], + // "enumDescriptions": [ + // "State of the rate plan is not specified.", + // "Rate plan is in draft mode and only visible to API providers.", + // "Rate plan is published and will become visible to developers for the configured duration (between `startTime` and `endTime`)." + // ], + // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+parent}/analytics/datastores:test", - // "request": { - // "$ref": "GoogleCloudApigeeV1Datastore" - // }, + // "path": "v1/{+parent}/rateplans", // "response": { - // "$ref": "GoogleCloudApigeeV1TestDatastoreResponse" + // "$ref": "GoogleCloudApigeeV1ListRatePlansResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12974,32 +16411,33 @@ func (c *OrganizationsAnalyticsDatastoresTestCall) Do(opts ...googleapi.CallOpti } -// method id "apigee.organizations.analytics.datastores.update": +// method id "apigee.organizations.apiproducts.rateplans.update": -type OrganizationsAnalyticsDatastoresUpdateCall struct { - s *Service - name string - googlecloudapigeev1datastore *GoogleCloudApigeeV1Datastore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApiproductsRateplansUpdateCall struct { + s *Service + name string + googlecloudapigeev1rateplan *GoogleCloudApigeeV1RatePlan + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Update a Datastore -// -// - name: The resource name of datastore to be updated. Must be of the -// form `organizations/{org}/analytics/datastores/{datastoreId}`. -func (r *OrganizationsAnalyticsDatastoresService) Update(name string, googlecloudapigeev1datastore *GoogleCloudApigeeV1Datastore) *OrganizationsAnalyticsDatastoresUpdateCall { - c := &OrganizationsAnalyticsDatastoresUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Update: Updates an existing rate plan. +// +// - name: Name of the rate plan. Use the following structure in your +// request: +// `organizations/{org}/apiproducts/{apiproduct}/rateplans/{rateplan}`. +func (r *OrganizationsApiproductsRateplansService) Update(name string, googlecloudapigeev1rateplan *GoogleCloudApigeeV1RatePlan) *OrganizationsApiproductsRateplansUpdateCall { + c := &OrganizationsApiproductsRateplansUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1datastore = googlecloudapigeev1datastore + c.googlecloudapigeev1rateplan = googlecloudapigeev1rateplan return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsAnalyticsDatastoresUpdateCall) Fields(s ...googleapi.Field) *OrganizationsAnalyticsDatastoresUpdateCall { +func (c *OrganizationsApiproductsRateplansUpdateCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsRateplansUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13007,21 +16445,21 @@ func (c *OrganizationsAnalyticsDatastoresUpdateCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsAnalyticsDatastoresUpdateCall) Context(ctx context.Context) *OrganizationsAnalyticsDatastoresUpdateCall { +func (c *OrganizationsApiproductsRateplansUpdateCall) Context(ctx context.Context) *OrganizationsApiproductsRateplansUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsAnalyticsDatastoresUpdateCall) Header() http.Header { +func (c *OrganizationsApiproductsRateplansUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsAnalyticsDatastoresUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApiproductsRateplansUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -13029,7 +16467,7 @@ func (c *OrganizationsAnalyticsDatastoresUpdateCall) doRequest(alt string) (*htt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1datastore) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1rateplan) if err != nil { return nil, err } @@ -13049,14 +16487,14 @@ func (c *OrganizationsAnalyticsDatastoresUpdateCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.analytics.datastores.update" call. -// Exactly one of *GoogleCloudApigeeV1Datastore or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Datastore.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.apiproducts.rateplans.update" call. +// Exactly one of *GoogleCloudApigeeV1RatePlan or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1RatePlan.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 *OrganizationsAnalyticsDatastoresUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Datastore, error) { +func (c *OrganizationsApiproductsRateplansUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1RatePlan, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13075,7 +16513,7 @@ func (c *OrganizationsAnalyticsDatastoresUpdateCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Datastore{ + ret := &GoogleCloudApigeeV1RatePlan{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13087,28 +16525,28 @@ func (c *OrganizationsAnalyticsDatastoresUpdateCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Update a Datastore", - // "flatPath": "v1/organizations/{organizationsId}/analytics/datastores/{datastoresId}", + // "description": "Updates an existing rate plan.", + // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/rateplans/{rateplansId}", // "httpMethod": "PUT", - // "id": "apigee.organizations.analytics.datastores.update", + // "id": "apigee.organizations.apiproducts.rateplans.update", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of datastore to be updated. Must be of the form `organizations/{org}/analytics/datastores/{datastoreId}`", + // "description": "Required. Name of the rate plan. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}/rateplans/{rateplan}`", // "location": "path", - // "pattern": "^organizations/[^/]+/analytics/datastores/[^/]+$", + // "pattern": "^organizations/[^/]+/apiproducts/[^/]+/rateplans/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudApigeeV1Datastore" + // "$ref": "GoogleCloudApigeeV1RatePlan" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Datastore" + // "$ref": "GoogleCloudApigeeV1RatePlan" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13117,42 +16555,72 @@ func (c *OrganizationsAnalyticsDatastoresUpdateCall) Do(opts ...googleapi.CallOp } -// method id "apigee.organizations.apiproducts.attributes": +// method id "apigee.organizations.apis.create": -type OrganizationsApiproductsAttributesCall struct { - s *Service - name string - googlecloudapigeev1attributes *GoogleCloudApigeeV1Attributes - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApisCreateCall struct { + s *Service + parent string + googleapihttpbody *GoogleApiHttpBody + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Attributes: Updates or creates API product attributes. This API -// **replaces** the current list of attributes with the attributes -// specified in the request body. In this way, you can update existing -// attributes, add new attributes, or delete existing attributes by -// omitting them from the request body. **Note**: OAuth access tokens -// and Key Management Service (KMS) entities (apps, developers, and API -// products) are cached for 180 seconds (current default). Any custom -// attributes associated with entities also get cached for at least 180 -// seconds after entity is accessed during runtime. In this case, the -// `ExpiresIn` element on the OAuthV2 policy won't be able to expire an -// access token in less than 180 seconds. +// Create: Creates an API proxy. The API proxy created will not be +// accessible at runtime until it is deployed to an environment. Create +// a new API proxy by setting the `name` query parameter to the name of +// the API proxy. Import an API proxy configuration bundle stored in zip +// format on your local machine to your organization by doing the +// following: * Set the `name` query parameter to the name of the API +// proxy. * Set the `action` query parameter to `import`. * Set the +// `Content-Type` header to `multipart/form-data`. * Pass as a file the +// name of API proxy configuration bundle stored in zip format on your +// local machine using the `file` form field. **Note**: To validate the +// API proxy configuration bundle only without importing it, set the +// `action` query parameter to `validate`. When importing an API proxy +// configuration bundle, if the API proxy does not exist, it will be +// created. If the API proxy exists, then a new revision is created. +// Invalid API proxy configurations are rejected, and a list of +// validation errors is returned to the client. // -// - name: Name of the API product. Use the following structure in your -// request: `organizations/{org}/apiproducts/{apiproduct}`. -func (r *OrganizationsApiproductsService) Attributes(name string, googlecloudapigeev1attributes *GoogleCloudApigeeV1Attributes) *OrganizationsApiproductsAttributesCall { - c := &OrganizationsApiproductsAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1attributes = googlecloudapigeev1attributes +// - parent: Name of the organization in the following format: +// `organizations/{org}`. +func (r *OrganizationsApisService) Create(parent string, googleapihttpbody *GoogleApiHttpBody) *OrganizationsApisCreateCall { + c := &OrganizationsApisCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleapihttpbody = googleapihttpbody + return c +} + +// Action sets the optional parameter "action": Action to perform when +// importing an API proxy configuration bundle. Set this parameter to +// one of the following values: * `import` to import the API proxy +// configuration bundle. * `validate` to validate the API proxy +// configuration bundle without importing it. +func (c *OrganizationsApisCreateCall) Action(action string) *OrganizationsApisCreateCall { + c.urlParams_.Set("action", action) + return c +} + +// Name sets the optional parameter "name": Name of the API proxy. +// Restrict the characters used to: A-Za-z0-9._- +func (c *OrganizationsApisCreateCall) Name(name string) *OrganizationsApisCreateCall { + c.urlParams_.Set("name", name) + return c +} + +// Validate sets the optional parameter "validate": Ignored. All uploads +// are validated regardless of the value of this field. Maintained for +// compatibility with Apigee Edge API. +func (c *OrganizationsApisCreateCall) Validate(validate bool) *OrganizationsApisCreateCall { + c.urlParams_.Set("validate", fmt.Sprint(validate)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApiproductsAttributesCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsAttributesCall { +func (c *OrganizationsApisCreateCall) Fields(s ...googleapi.Field) *OrganizationsApisCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13160,21 +16628,21 @@ func (c *OrganizationsApiproductsAttributesCall) Fields(s ...googleapi.Field) *O // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsApiproductsAttributesCall) Context(ctx context.Context) *OrganizationsApiproductsAttributesCall { +func (c *OrganizationsApisCreateCall) Context(ctx context.Context) *OrganizationsApisCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsAttributesCall) Header() http.Header { +func (c *OrganizationsApisCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsAttributesCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -13182,14 +16650,14 @@ func (c *OrganizationsApiproductsAttributesCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1attributes) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) 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, "v1/{+name}/attributes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apis") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -13197,19 +16665,20 @@ func (c *OrganizationsApiproductsAttributesCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.attributes" call. -// Exactly one of *GoogleCloudApigeeV1Attributes or error will be +// Do executes the "apigee.organizations.apis.create" call. +// Exactly one of *GoogleCloudApigeeV1ApiProxyRevision or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Attributes.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 *OrganizationsApiproductsAttributesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attributes, error) { +// either *GoogleCloudApigeeV1ApiProxyRevision.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 *OrganizationsApisCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProxyRevision, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13228,7 +16697,7 @@ func (c *OrganizationsApiproductsAttributesCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Attributes{ + ret := &GoogleCloudApigeeV1ApiProxyRevision{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13240,28 +16709,43 @@ func (c *OrganizationsApiproductsAttributesCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Updates or creates API product attributes. This API **replaces** the current list of attributes with the attributes specified in the request body. In this way, you can update existing attributes, add new attributes, or delete existing attributes by omitting them from the request body. **Note**: OAuth access tokens and Key Management Service (KMS) entities (apps, developers, and API products) are cached for 180 seconds (current default). Any custom attributes associated with entities also get cached for at least 180 seconds after entity is accessed during runtime. In this case, the `ExpiresIn` element on the OAuthV2 policy won't be able to expire an access token in less than 180 seconds.", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/attributes", + // "description": "Creates an API proxy. The API proxy created will not be accessible at runtime until it is deployed to an environment. Create a new API proxy by setting the `name` query parameter to the name of the API proxy. Import an API proxy configuration bundle stored in zip format on your local machine to your organization by doing the following: * Set the `name` query parameter to the name of the API proxy. * Set the `action` query parameter to `import`. * Set the `Content-Type` header to `multipart/form-data`. * Pass as a file the name of API proxy configuration bundle stored in zip format on your local machine using the `file` form field. **Note**: To validate the API proxy configuration bundle only without importing it, set the `action` query parameter to `validate`. When importing an API proxy configuration bundle, if the API proxy does not exist, it will be created. If the API proxy exists, then a new revision is created. Invalid API proxy configurations are rejected, and a list of validation errors is returned to the client.", + // "flatPath": "v1/organizations/{organizationsId}/apis", // "httpMethod": "POST", - // "id": "apigee.organizations.apiproducts.attributes", + // "id": "apigee.organizations.apis.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { + // "action": { + // "description": "Action to perform when importing an API proxy configuration bundle. Set this parameter to one of the following values: * `import` to import the API proxy configuration bundle. * `validate` to validate the API proxy configuration bundle without importing it.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. Name of the API product. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}`", + // "description": "Name of the API proxy. Restrict the characters used to: A-Za-z0-9._-", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of the organization in the following format: `organizations/{org}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apiproducts/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" + // }, + // "validate": { + // "description": "Ignored. All uploads are validated regardless of the value of this field. Maintained for compatibility with Apigee Edge API.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+name}/attributes", + // "path": "v1/{+parent}/apis", // "request": { - // "$ref": "GoogleCloudApigeeV1Attributes" + // "$ref": "GoogleApiHttpBody" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Attributes" + // "$ref": "GoogleCloudApigeeV1ApiProxyRevision" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13270,51 +16754,32 @@ func (c *OrganizationsApiproductsAttributesCall) Do(opts ...googleapi.CallOption } -// method id "apigee.organizations.apiproducts.create": +// method id "apigee.organizations.apis.delete": -type OrganizationsApiproductsCreateCall struct { - s *Service - parent string - googlecloudapigeev1apiproduct *GoogleCloudApigeeV1ApiProduct - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApisDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an API product in an organization. You create API -// products after you have proxied backend services using API proxies. -// An API product is a collection of API resources combined with quota -// settings and metadata that you can use to deliver customized and -// productized API bundles to your developer community. This metadata -// can include: - Scope - Environments - API proxies - Extensible -// profile API products enable you repackage APIs on the fly, without -// having to do any additional coding or configuration. Apigee -// recommends that you start with a simple API product including only -// required elements. You then provision credentials to apps to enable -// them to start testing your APIs. After you have authentication and -// authorization working against a simple API product, you can iterate -// to create finer-grained API products, defining different sets of API -// resources for each API product. **WARNING:** - If you don't specify -// an API proxy in the request body, *any* app associated with the -// product can make calls to *any* API in your entire organization. - If -// you don't specify an environment in the request body, the product -// allows access to all environments. For more information, see What is -// an API product? +// Delete: Deletes an API proxy and all associated endpoints, policies, +// resources, and revisions. The API proxy must be undeployed before you +// can delete it. // -// - parent: Name of the organization in which the API product will be -// created. Use the following structure in your request: -// `organizations/{org}`. -func (r *OrganizationsApiproductsService) Create(parent string, googlecloudapigeev1apiproduct *GoogleCloudApigeeV1ApiProduct) *OrganizationsApiproductsCreateCall { - c := &OrganizationsApiproductsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1apiproduct = googlecloudapigeev1apiproduct +// - name: Name of the API proxy in the following format: +// `organizations/{org}/apis/{api}`. +func (r *OrganizationsApisService) Delete(name string) *OrganizationsApisDeleteCall { + c := &OrganizationsApisDeleteCall{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 *OrganizationsApiproductsCreateCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsCreateCall { +func (c *OrganizationsApisDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApisDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13322,21 +16787,21 @@ func (c *OrganizationsApiproductsCreateCall) Fields(s ...googleapi.Field) *Organ // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsApiproductsCreateCall) Context(ctx context.Context) *OrganizationsApiproductsCreateCall { +func (c *OrganizationsApisDeleteCall) Context(ctx context.Context) *OrganizationsApisDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsCreateCall) Header() http.Header { +func (c *OrganizationsApisDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -13344,34 +16809,29 @@ func (c *OrganizationsApiproductsCreateCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1apiproduct) - 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, "v1/{+parent}/apiproducts") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.create" call. -// Exactly one of *GoogleCloudApigeeV1ApiProduct or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1ApiProduct.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.apis.delete" call. +// Exactly one of *GoogleCloudApigeeV1ApiProxy or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1ApiProxy.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 *OrganizationsApiproductsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProduct, error) { +func (c *OrganizationsApisDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProxy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13390,7 +16850,7 @@ func (c *OrganizationsApiproductsCreateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ApiProduct{ + ret := &GoogleCloudApigeeV1ApiProxy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13402,28 +16862,25 @@ func (c *OrganizationsApiproductsCreateCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Creates an API product in an organization. You create API products after you have proxied backend services using API proxies. An API product is a collection of API resources combined with quota settings and metadata that you can use to deliver customized and productized API bundles to your developer community. This metadata can include: - Scope - Environments - API proxies - Extensible profile API products enable you repackage APIs on the fly, without having to do any additional coding or configuration. Apigee recommends that you start with a simple API product including only required elements. You then provision credentials to apps to enable them to start testing your APIs. After you have authentication and authorization working against a simple API product, you can iterate to create finer-grained API products, defining different sets of API resources for each API product. **WARNING:** - If you don't specify an API proxy in the request body, *any* app associated with the product can make calls to *any* API in your entire organization. - If you don't specify an environment in the request body, the product allows access to all environments. For more information, see What is an API product?", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts", - // "httpMethod": "POST", - // "id": "apigee.organizations.apiproducts.create", + // "description": "Deletes an API proxy and all associated endpoints, policies, resources, and revisions. The API proxy must be undeployed before you can delete it.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.apis.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name of the organization in which the API product will be created. Use the following structure in your request: `organizations/{org}`", + // "name": { + // "description": "Required. Name of the API proxy in the following format: `organizations/{org}/apis/{api}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/apiproducts", - // "request": { - // "$ref": "GoogleCloudApigeeV1ApiProduct" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ApiProduct" + // "$ref": "GoogleCloudApigeeV1ApiProxy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13432,30 +16889,23 @@ func (c *OrganizationsApiproductsCreateCall) Do(opts ...googleapi.CallOption) (* } -// method id "apigee.organizations.apiproducts.delete": +// method id "apigee.organizations.apis.get": -type OrganizationsApiproductsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApisGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an API product from an organization. Deleting an API -// product causes app requests to the resource URIs defined in the API -// product to fail. Ensure that you create a new API product to serve -// existing apps, unless your intention is to disable access to the -// resources defined in the API product. The API product name required -// in the request URL is the internal name of the product, not the -// display name. While they may be the same, it depends on whether the -// API product was created via the UI or the API. View the list of API -// products to verify the internal name. +// Get: Gets an API proxy including a list of existing revisions. // -// - name: Name of the API product. Use the following structure in your -// request: `organizations/{org}/apiproducts/{apiproduct}`. -func (r *OrganizationsApiproductsService) Delete(name string) *OrganizationsApiproductsDeleteCall { - c := &OrganizationsApiproductsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the API proxy in the following format: +// `organizations/{org}/apis/{api}`. +func (r *OrganizationsApisService) Get(name string) *OrganizationsApisGetCall { + c := &OrganizationsApisGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -13463,41 +16913,54 @@ func (r *OrganizationsApiproductsService) Delete(name string) *OrganizationsApip // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApiproductsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsDeleteCall { +func (c *OrganizationsApisGetCall) Fields(s ...googleapi.Field) *OrganizationsApisGetCall { 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 *OrganizationsApisGetCall) IfNoneMatch(entityTag string) *OrganizationsApisGetCall { + 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 *OrganizationsApiproductsDeleteCall) Context(ctx context.Context) *OrganizationsApiproductsDeleteCall { +func (c *OrganizationsApisGetCall) Context(ctx context.Context) *OrganizationsApisGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsDeleteCall) Header() http.Header { +func (c *OrganizationsApisGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -13508,14 +16971,14 @@ func (c *OrganizationsApiproductsDeleteCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.delete" call. -// Exactly one of *GoogleCloudApigeeV1ApiProduct or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1ApiProduct.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.apis.get" call. +// Exactly one of *GoogleCloudApigeeV1ApiProxy or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1ApiProxy.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 *OrganizationsApiproductsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProduct, error) { +func (c *OrganizationsApisGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProxy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13534,7 +16997,7 @@ func (c *OrganizationsApiproductsDeleteCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ApiProduct{ + ret := &GoogleCloudApigeeV1ApiProxy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13546,25 +17009,25 @@ func (c *OrganizationsApiproductsDeleteCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Deletes an API product from an organization. Deleting an API product causes app requests to the resource URIs defined in the API product to fail. Ensure that you create a new API product to serve existing apps, unless your intention is to disable access to the resources defined in the API product. The API product name required in the request URL is the internal name of the product, not the display name. While they may be the same, it depends on whether the API product was created via the UI or the API. View the list of API products to verify the internal name.", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.apiproducts.delete", + // "description": "Gets an API proxy including a list of existing revisions.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.apis.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the API product. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}`", + // "description": "Required. Name of the API proxy in the following format: `organizations/{org}/apis/{api}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apiproducts/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ApiProduct" + // "$ref": "GoogleCloudApigeeV1ApiProxy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13573,35 +17036,48 @@ func (c *OrganizationsApiproductsDeleteCall) Do(opts ...googleapi.CallOption) (* } -// method id "apigee.organizations.apiproducts.get": +// method id "apigee.organizations.apis.list": -type OrganizationsApiproductsGetCall struct { +type OrganizationsApisListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets configuration details for an API product. The API product -// name required in the request URL is the internal name of the product, -// not the display name. While they may be the same, it depends on -// whether the API product was created via the UI or the API. View the -// list of API products to verify the internal name. +// List: Lists the names of all API proxies in an organization. The +// names returned correspond to the names defined in the configuration +// files for each API proxy. // -// - name: Name of the API product. Use the following structure in your -// request: `organizations/{org}/apiproducts/{apiproduct}`. -func (r *OrganizationsApiproductsService) Get(name string) *OrganizationsApiproductsGetCall { - c := &OrganizationsApiproductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the organization in the following format: +// `organizations/{org}`. +func (r *OrganizationsApisService) List(parent string) *OrganizationsApisListCall { + c := &OrganizationsApisListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// IncludeMetaData sets the optional parameter "includeMetaData": Flag +// that specifies whether to include API proxy metadata in the response. +func (c *OrganizationsApisListCall) IncludeMetaData(includeMetaData bool) *OrganizationsApisListCall { + c.urlParams_.Set("includeMetaData", fmt.Sprint(includeMetaData)) + return c +} + +// IncludeRevisions sets the optional parameter "includeRevisions": Flag +// that specifies whether to include a list of revisions in the +// response. +func (c *OrganizationsApisListCall) IncludeRevisions(includeRevisions bool) *OrganizationsApisListCall { + c.urlParams_.Set("includeRevisions", fmt.Sprint(includeRevisions)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApiproductsGetCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsGetCall { +func (c *OrganizationsApisListCall) Fields(s ...googleapi.Field) *OrganizationsApisListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13611,7 +17087,7 @@ func (c *OrganizationsApiproductsGetCall) Fields(s ...googleapi.Field) *Organiza // 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 *OrganizationsApiproductsGetCall) IfNoneMatch(entityTag string) *OrganizationsApiproductsGetCall { +func (c *OrganizationsApisListCall) IfNoneMatch(entityTag string) *OrganizationsApisListCall { c.ifNoneMatch_ = entityTag return c } @@ -13619,21 +17095,21 @@ func (c *OrganizationsApiproductsGetCall) IfNoneMatch(entityTag string) *Organiz // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsApiproductsGetCall) Context(ctx context.Context) *OrganizationsApiproductsGetCall { +func (c *OrganizationsApisListCall) Context(ctx context.Context) *OrganizationsApisListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsGetCall) Header() http.Header { +func (c *OrganizationsApisListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -13646,7 +17122,7 @@ func (c *OrganizationsApiproductsGetCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apis") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -13654,19 +17130,21 @@ func (c *OrganizationsApiproductsGetCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.get" call. -// Exactly one of *GoogleCloudApigeeV1ApiProduct or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1ApiProduct.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 *OrganizationsApiproductsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProduct, error) { +// Do executes the "apigee.organizations.apis.list" call. +// Exactly one of *GoogleCloudApigeeV1ListApiProxiesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListApiProxiesResponse.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 *OrganizationsApisListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListApiProxiesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13685,7 +17163,7 @@ func (c *OrganizationsApiproductsGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ApiProduct{ + ret := &GoogleCloudApigeeV1ListApiProxiesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13697,169 +17175,133 @@ func (c *OrganizationsApiproductsGetCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Gets configuration details for an API product. The API product name required in the request URL is the internal name of the product, not the display name. While they may be the same, it depends on whether the API product was created via the UI or the API. View the list of API products to verify the internal name.", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}", + // "description": "Lists the names of all API proxies in an organization. The names returned correspond to the names defined in the configuration files for each API proxy.", + // "flatPath": "v1/organizations/{organizationsId}/apis", // "httpMethod": "GET", - // "id": "apigee.organizations.apiproducts.get", + // "id": "apigee.organizations.apis.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the API product. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}`", + // "includeMetaData": { + // "description": "Flag that specifies whether to include API proxy metadata in the response.", + // "location": "query", + // "type": "boolean" + // }, + // "includeRevisions": { + // "description": "Flag that specifies whether to include a list of revisions in the response.", + // "location": "query", + // "type": "boolean" + // }, + // "parent": { + // "description": "Required. Name of the organization in the following format: `organizations/{org}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apiproducts/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "GoogleCloudApigeeV1ApiProduct" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "apigee.organizations.apiproducts.list": - -type OrganizationsApiproductsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all API product names for an organization. Filter the -// list by passing an `attributename` and `attibutevalue`. The maximum -// number of API products returned is 1000. You can paginate the list of -// API products returned using the `startKey` and `count` query -// parameters. -// -// - parent: Name of the organization. Use the following structure in -// your request: `organizations/{org}`. -func (r *OrganizationsApiproductsService) List(parent string) *OrganizationsApiproductsListCall { - c := &OrganizationsApiproductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} + // }, + // "path": "v1/{+parent}/apis", + // "response": { + // "$ref": "GoogleCloudApigeeV1ListApiProxiesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } -// Attributename sets the optional parameter "attributename": Name of -// the attribute used to filter the search. -func (c *OrganizationsApiproductsListCall) Attributename(attributename string) *OrganizationsApiproductsListCall { - c.urlParams_.Set("attributename", attributename) - return c } -// Attributevalue sets the optional parameter "attributevalue": Value of -// the attribute used to filter the search. -func (c *OrganizationsApiproductsListCall) Attributevalue(attributevalue string) *OrganizationsApiproductsListCall { - c.urlParams_.Set("attributevalue", attributevalue) - return c -} +// method id "apigee.organizations.apis.patch": -// Count sets the optional parameter "count": Enter the number of API -// products you want returned in the API call. The limit is 1000. -func (c *OrganizationsApiproductsListCall) Count(count int64) *OrganizationsApiproductsListCall { - c.urlParams_.Set("count", fmt.Sprint(count)) - return c +type OrganizationsApisPatchCall struct { + s *Service + name string + googlecloudapigeev1apiproxy *GoogleCloudApigeeV1ApiProxy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Expand sets the optional parameter "expand": Flag that specifies -// whether to expand the results. Set to `true` to get expanded details -// about each API. -func (c *OrganizationsApiproductsListCall) Expand(expand bool) *OrganizationsApiproductsListCall { - c.urlParams_.Set("expand", fmt.Sprint(expand)) +// Patch: Updates an existing API proxy. +// +// - name: API proxy to update in the following format: +// `organizations/{org}/apis/{api}`. +func (r *OrganizationsApisService) Patch(name string, googlecloudapigeev1apiproxy *GoogleCloudApigeeV1ApiProxy) *OrganizationsApisPatchCall { + c := &OrganizationsApisPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1apiproxy = googlecloudapigeev1apiproxy return c } -// StartKey sets the optional parameter "startKey": Gets a list of API -// products starting with a specific API product in the list. For -// example, if you're returning 50 API products at a time (using the -// `count` query parameter), you can view products 50-99 by entering the -// name of the 50th API product in the first API (without using -// `startKey`). Product name is case sensitive. -func (c *OrganizationsApiproductsListCall) StartKey(startKey string) *OrganizationsApiproductsListCall { - c.urlParams_.Set("startKey", startKey) +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to update. +func (c *OrganizationsApisPatchCall) UpdateMask(updateMask string) *OrganizationsApisPatchCall { + 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 *OrganizationsApiproductsListCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsListCall { +func (c *OrganizationsApisPatchCall) Fields(s ...googleapi.Field) *OrganizationsApisPatchCall { 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 *OrganizationsApiproductsListCall) IfNoneMatch(entityTag string) *OrganizationsApiproductsListCall { - 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 *OrganizationsApiproductsListCall) Context(ctx context.Context) *OrganizationsApiproductsListCall { +func (c *OrganizationsApisPatchCall) Context(ctx context.Context) *OrganizationsApisPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsListCall) Header() http.Header { +func (c *OrganizationsApisPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1apiproxy) + 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, "v1/{+parent}/apiproducts") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.list" call. -// Exactly one of *GoogleCloudApigeeV1ListApiProductsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListApiProductsResponse.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 *OrganizationsApiproductsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListApiProductsResponse, error) { +// Do executes the "apigee.organizations.apis.patch" call. +// Exactly one of *GoogleCloudApigeeV1ApiProxy or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1ApiProxy.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 *OrganizationsApisPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProxy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13878,7 +17320,7 @@ func (c *OrganizationsApiproductsListCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListApiProductsResponse{ + ret := &GoogleCloudApigeeV1ApiProxy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13890,51 +17332,34 @@ func (c *OrganizationsApiproductsListCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Lists all API product names for an organization. Filter the list by passing an `attributename` and `attibutevalue`. The maximum number of API products returned is 1000. You can paginate the list of API products returned using the `startKey` and `count` query parameters.", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts", - // "httpMethod": "GET", - // "id": "apigee.organizations.apiproducts.list", + // "description": "Updates an existing API proxy.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}", + // "httpMethod": "PATCH", + // "id": "apigee.organizations.apis.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "attributename": { - // "description": "Name of the attribute used to filter the search.", - // "location": "query", - // "type": "string" - // }, - // "attributevalue": { - // "description": "Value of the attribute used to filter the search.", - // "location": "query", - // "type": "string" - // }, - // "count": { - // "description": "Enter the number of API products you want returned in the API call. The limit is 1000.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "expand": { - // "description": "Flag that specifies whether to expand the results. Set to `true` to get expanded details about each API.", - // "location": "query", - // "type": "boolean" - // }, - // "parent": { - // "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}`", + // "name": { + // "description": "Required. API proxy to update in the following format: `organizations/{org}/apis/{api}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+$", // "required": true, // "type": "string" // }, - // "startKey": { - // "description": "Gets a list of API products starting with a specific API product in the list. For example, if you're returning 50 API products at a time (using the `count` query parameter), you can view products 50-99 by entering the name of the 50th API product in the first API (without using `startKey`). Product name is case sensitive.", + // "updateMask": { + // "description": "Required. The list of fields to update.", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+parent}/apiproducts", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1ApiProxy" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ListApiProductsResponse" + // "$ref": "GoogleCloudApigeeV1ApiProxy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13943,95 +17368,99 @@ func (c *OrganizationsApiproductsListCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "apigee.organizations.apiproducts.update": +// method id "apigee.organizations.apis.deployments.list": -type OrganizationsApiproductsUpdateCall struct { - s *Service - name string - googlecloudapigeev1apiproduct *GoogleCloudApigeeV1ApiProduct - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApisDeploymentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates an existing API product. You must include all -// required values, whether or not you are updating them, as well as any -// optional values that you are updating. The API product name required -// in the request URL is the internal name of the product, not the -// display name. While they may be the same, it depends on whether the -// API product was created via UI or API. View the list of API products -// to identify their internal names. +// List: Lists all deployments of an API proxy. // -// - name: Name of the API product. Use the following structure in your -// request: `organizations/{org}/apiproducts/{apiproduct}`. -func (r *OrganizationsApiproductsService) Update(name string, googlecloudapigeev1apiproduct *GoogleCloudApigeeV1ApiProduct) *OrganizationsApiproductsUpdateCall { - c := &OrganizationsApiproductsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1apiproduct = googlecloudapigeev1apiproduct +// - parent: Name of the API proxy for which to return deployment +// information in the following format: +// `organizations/{org}/apis/{api}`. +func (r *OrganizationsApisDeploymentsService) List(parent string) *OrganizationsApisDeploymentsListCall { + c := &OrganizationsApisDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApiproductsUpdateCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsUpdateCall { +func (c *OrganizationsApisDeploymentsListCall) Fields(s ...googleapi.Field) *OrganizationsApisDeploymentsListCall { 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 *OrganizationsApisDeploymentsListCall) IfNoneMatch(entityTag string) *OrganizationsApisDeploymentsListCall { + 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 *OrganizationsApiproductsUpdateCall) Context(ctx context.Context) *OrganizationsApiproductsUpdateCall { +func (c *OrganizationsApisDeploymentsListCall) Context(ctx context.Context) *OrganizationsApisDeploymentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsUpdateCall) Header() http.Header { +func (c *OrganizationsApisDeploymentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisDeploymentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1apiproduct) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.update" call. -// Exactly one of *GoogleCloudApigeeV1ApiProduct or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1ApiProduct.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 *OrganizationsApiproductsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProduct, error) { +// Do executes the "apigee.organizations.apis.deployments.list" call. +// Exactly one of *GoogleCloudApigeeV1ListDeploymentsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListDeploymentsResponse.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 *OrganizationsApisDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeploymentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14050,7 +17479,7 @@ func (c *OrganizationsApiproductsUpdateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ApiProduct{ + ret := &GoogleCloudApigeeV1ListDeploymentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14062,28 +17491,25 @@ func (c *OrganizationsApiproductsUpdateCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Updates an existing API product. You must include all required values, whether or not you are updating them, as well as any optional values that you are updating. The API product name required in the request URL is the internal name of the product, not the display name. While they may be the same, it depends on whether the API product was created via UI or API. View the list of API products to identify their internal names.", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}", - // "httpMethod": "PUT", - // "id": "apigee.organizations.apiproducts.update", + // "description": "Lists all deployments of an API proxy.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/deployments", + // "httpMethod": "GET", + // "id": "apigee.organizations.apis.deployments.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the API product. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}`", + // "parent": { + // "description": "Required. Name of the API proxy for which to return deployment information in the following format: `organizations/{org}/apis/{api}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apiproducts/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1ApiProduct" - // }, + // "path": "v1/{+parent}/deployments", // "response": { - // "$ref": "GoogleCloudApigeeV1ApiProduct" + // "$ref": "GoogleCloudApigeeV1ListDeploymentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14092,32 +17518,33 @@ func (c *OrganizationsApiproductsUpdateCall) Do(opts ...googleapi.CallOption) (* } -// method id "apigee.organizations.apiproducts.attributes.delete": +// method id "apigee.organizations.apis.keyvaluemaps.create": -type OrganizationsApiproductsAttributesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApisKeyvaluemapsCreateCall struct { + s *Service + parent string + googlecloudapigeev1keyvaluemap *GoogleCloudApigeeV1KeyValueMap + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an API product attribute. +// Create: Creates a key value map in an API proxy. // -// - name: Name of the API product attribute. Use the following -// structure in your request: -// `organizations/{org}/apiproducts/{apiproduct}/attributes/{attribute} -// `. -func (r *OrganizationsApiproductsAttributesService) Delete(name string) *OrganizationsApiproductsAttributesDeleteCall { - c := &OrganizationsApiproductsAttributesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the environment in which to create the key value +// map. Use the following structure in your request: +// `organizations/{org}/apis/{api}`. +func (r *OrganizationsApisKeyvaluemapsService) Create(parent string, googlecloudapigeev1keyvaluemap *GoogleCloudApigeeV1KeyValueMap) *OrganizationsApisKeyvaluemapsCreateCall { + c := &OrganizationsApisKeyvaluemapsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1keyvaluemap = googlecloudapigeev1keyvaluemap return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApiproductsAttributesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsAttributesDeleteCall { +func (c *OrganizationsApisKeyvaluemapsCreateCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14125,21 +17552,21 @@ func (c *OrganizationsApiproductsAttributesDeleteCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsApiproductsAttributesDeleteCall) Context(ctx context.Context) *OrganizationsApiproductsAttributesDeleteCall { +func (c *OrganizationsApisKeyvaluemapsCreateCall) Context(ctx context.Context) *OrganizationsApisKeyvaluemapsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsAttributesDeleteCall) Header() http.Header { +func (c *OrganizationsApisKeyvaluemapsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsAttributesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisKeyvaluemapsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -14147,29 +17574,34 @@ func (c *OrganizationsApiproductsAttributesDeleteCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1keyvaluemap) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keyvaluemaps") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.attributes.delete" call. -// Exactly one of *GoogleCloudApigeeV1Attribute or error will be +// Do executes the "apigee.organizations.apis.keyvaluemaps.create" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueMap or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Attribute.ServerResponse.Header or (if a +// either *GoogleCloudApigeeV1KeyValueMap.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 *OrganizationsApiproductsAttributesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { +func (c *OrganizationsApisKeyvaluemapsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueMap, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14188,7 +17620,7 @@ func (c *OrganizationsApiproductsAttributesDeleteCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Attribute{ + ret := &GoogleCloudApigeeV1KeyValueMap{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14200,25 +17632,28 @@ func (c *OrganizationsApiproductsAttributesDeleteCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Deletes an API product attribute.", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/attributes/{attributesId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.apiproducts.attributes.delete", + // "description": "Creates a key value map in an API proxy.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps", + // "httpMethod": "POST", + // "id": "apigee.organizations.apis.keyvaluemaps.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the API product attribute. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}/attributes/{attribute}`", + // "parent": { + // "description": "Required. Name of the environment in which to create the key value map. Use the following structure in your request: `organizations/{org}/apis/{api}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apiproducts/[^/]+/attributes/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/keyvaluemaps", + // "request": { + // "$ref": "GoogleCloudApigeeV1KeyValueMap" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Attribute" + // "$ref": "GoogleCloudApigeeV1KeyValueMap" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14227,25 +17662,23 @@ func (c *OrganizationsApiproductsAttributesDeleteCall) Do(opts ...googleapi.Call } -// method id "apigee.organizations.apiproducts.attributes.get": +// method id "apigee.organizations.apis.keyvaluemaps.delete": -type OrganizationsApiproductsAttributesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsApisKeyvaluemapsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the value of an API product attribute. +// Delete: Deletes a key value map from an API proxy. // -// - name: Name of the API product attribute. Use the following -// structure in your request: -// `organizations/{org}/apiproducts/{apiproduct}/attributes/{attribute} -// `. -func (r *OrganizationsApiproductsAttributesService) Get(name string) *OrganizationsApiproductsAttributesGetCall { - c := &OrganizationsApiproductsAttributesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the key value map. Use the following structure in +// your request: +// `organizations/{org}/apis/{api}/keyvaluemaps/{keyvaluemap}`. +func (r *OrganizationsApisKeyvaluemapsService) Delete(name string) *OrganizationsApisKeyvaluemapsDeleteCall { + c := &OrganizationsApisKeyvaluemapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -14253,54 +17686,41 @@ func (r *OrganizationsApiproductsAttributesService) Get(name string) *Organizati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApiproductsAttributesGetCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsAttributesGetCall { +func (c *OrganizationsApisKeyvaluemapsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsDeleteCall { 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 *OrganizationsApiproductsAttributesGetCall) IfNoneMatch(entityTag string) *OrganizationsApiproductsAttributesGetCall { - 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 *OrganizationsApiproductsAttributesGetCall) Context(ctx context.Context) *OrganizationsApiproductsAttributesGetCall { +func (c *OrganizationsApisKeyvaluemapsDeleteCall) Context(ctx context.Context) *OrganizationsApisKeyvaluemapsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsAttributesGetCall) Header() http.Header { +func (c *OrganizationsApisKeyvaluemapsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsAttributesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisKeyvaluemapsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -14311,14 +17731,14 @@ func (c *OrganizationsApiproductsAttributesGetCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.attributes.get" call. -// Exactly one of *GoogleCloudApigeeV1Attribute or error will be +// Do executes the "apigee.organizations.apis.keyvaluemaps.delete" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueMap or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Attribute.ServerResponse.Header or (if a +// either *GoogleCloudApigeeV1KeyValueMap.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 *OrganizationsApiproductsAttributesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { +func (c *OrganizationsApisKeyvaluemapsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueMap, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14337,7 +17757,7 @@ func (c *OrganizationsApiproductsAttributesGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Attribute{ + ret := &GoogleCloudApigeeV1KeyValueMap{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14349,25 +17769,25 @@ func (c *OrganizationsApiproductsAttributesGetCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Gets the value of an API product attribute.", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/attributes/{attributesId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.apiproducts.attributes.get", + // "description": "Deletes a key value map from an API proxy.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps/{keyvaluemapsId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.apis.keyvaluemaps.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the API product attribute. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}/attributes/{attribute}`", + // "description": "Required. Name of the key value map. Use the following structure in your request: `organizations/{org}/apis/{api}/keyvaluemaps/{keyvaluemap}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apiproducts/[^/]+/attributes/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Attribute" + // "$ref": "GoogleCloudApigeeV1KeyValueMap" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14376,78 +17796,78 @@ func (c *OrganizationsApiproductsAttributesGetCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.apiproducts.attributes.list": +// method id "apigee.organizations.apis.keyvaluemaps.entries.create": -type OrganizationsApiproductsAttributesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsApisKeyvaluemapsEntriesCreateCall struct { + s *Service + parent string + googlecloudapigeev1keyvalueentry *GoogleCloudApigeeV1KeyValueEntry + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all API product attributes. +// Create: Creates key value entries in a key value map scoped to an +// organization, environment, or API proxy. // -// - parent: Name of the API product. Use the following structure in -// your request: `organizations/{org}/apiproducts/{apiproduct}`. -func (r *OrganizationsApiproductsAttributesService) List(parent string) *OrganizationsApiproductsAttributesListCall { - c := &OrganizationsApiproductsAttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Scope as indicated by the URI in which to create the key +// value map entry. Use **one** of the following structures in your +// request: * +// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}` +// . * +// `organizations/{organization}/environments/{environment}/keyvaluemap +// s/{keyvaluemap}` * +// `organizations/{organization}/keyvaluemaps/{keyvaluemap}`. +func (r *OrganizationsApisKeyvaluemapsEntriesService) Create(parent string, googlecloudapigeev1keyvalueentry *GoogleCloudApigeeV1KeyValueEntry) *OrganizationsApisKeyvaluemapsEntriesCreateCall { + c := &OrganizationsApisKeyvaluemapsEntriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.googlecloudapigeev1keyvalueentry = googlecloudapigeev1keyvalueentry return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApiproductsAttributesListCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsAttributesListCall { +func (c *OrganizationsApisKeyvaluemapsEntriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsEntriesCreateCall { 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 *OrganizationsApiproductsAttributesListCall) IfNoneMatch(entityTag string) *OrganizationsApiproductsAttributesListCall { - 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 *OrganizationsApiproductsAttributesListCall) Context(ctx context.Context) *OrganizationsApiproductsAttributesListCall { +func (c *OrganizationsApisKeyvaluemapsEntriesCreateCall) Context(ctx context.Context) *OrganizationsApisKeyvaluemapsEntriesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsAttributesListCall) Header() http.Header { +func (c *OrganizationsApisKeyvaluemapsEntriesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsAttributesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisKeyvaluemapsEntriesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1keyvalueentry) + 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, "v1/{+parent}/attributes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -14458,14 +17878,14 @@ func (c *OrganizationsApiproductsAttributesListCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.attributes.list" call. -// Exactly one of *GoogleCloudApigeeV1Attributes or error will be +// Do executes the "apigee.organizations.apis.keyvaluemaps.entries.create" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Attributes.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 +// either *GoogleCloudApigeeV1KeyValueEntry.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 *OrganizationsApiproductsAttributesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attributes, error) { +func (c *OrganizationsApisKeyvaluemapsEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14484,7 +17904,7 @@ func (c *OrganizationsApiproductsAttributesListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Attributes{ + ret := &GoogleCloudApigeeV1KeyValueEntry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14496,25 +17916,28 @@ func (c *OrganizationsApiproductsAttributesListCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Lists all API product attributes.", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/attributes", - // "httpMethod": "GET", - // "id": "apigee.organizations.apiproducts.attributes.list", + // "description": "Creates key value entries in a key value map scoped to an organization, environment, or API proxy.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps/{keyvaluemapsId}/entries", + // "httpMethod": "POST", + // "id": "apigee.organizations.apis.keyvaluemaps.entries.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Name of the API product. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}`", + // "description": "Required. Scope as indicated by the URI in which to create the key value map entry. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/apiproducts/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/attributes", + // "path": "v1/{+parent}/entries", + // "request": { + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Attributes" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14523,39 +17946,41 @@ func (c *OrganizationsApiproductsAttributesListCall) Do(opts ...googleapi.CallOp } -// method id "apigee.organizations.apiproducts.attributes.updateApiProductAttribute": +// method id "apigee.organizations.apis.keyvaluemaps.entries.delete": -type OrganizationsApiproductsAttributesUpdateApiProductAttributeCall struct { - s *Service - name string - googlecloudapigeev1attribute *GoogleCloudApigeeV1Attribute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApisKeyvaluemapsEntriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateApiProductAttribute: Updates the value of an API product -// attribute. **Note**: OAuth access tokens and Key Management Service -// (KMS) entities (apps, developers, and API products) are cached for -// 180 seconds (current default). Any custom attributes associated with -// entities also get cached for at least 180 seconds after entity is -// accessed during runtime. In this case, the `ExpiresIn` element on the -// OAuthV2 policy won't be able to expire an access token in less than -// 180 seconds. +// Delete: Deletes a key value entry from a key value map scoped to an +// organization, environment, or API proxy. **Note:** After you delete +// the key value entry, the policy consuming the entry will continue to +// function with its cached values for a few minutes. This is expected +// behavior. // -// - name: Name of the API product. Use the following structure in your -// request: `organizations/{org}/apiproducts/{apiproduct}`. -func (r *OrganizationsApiproductsAttributesService) UpdateApiProductAttribute(name string, googlecloudapigeev1attribute *GoogleCloudApigeeV1Attribute) *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall { - c := &OrganizationsApiproductsAttributesUpdateApiProductAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Scope as indicated by the URI in which to delete the key +// value map entry. Use **one** of the following structures in your +// request: * +// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/ +// entries/{entry}`. * +// `organizations/{organization}/environments/{environment}/keyvaluemap +// s/{keyvaluemap}/entries/{entry}` * +// `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{en +// try}`. +func (r *OrganizationsApisKeyvaluemapsEntriesService) Delete(name string) *OrganizationsApisKeyvaluemapsEntriesDeleteCall { + c := &OrganizationsApisKeyvaluemapsEntriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1attribute = googlecloudapigeev1attribute return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall { +func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsEntriesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14563,21 +17988,21 @@ func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) Fields // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) Context(ctx context.Context) *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall { +func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) Context(ctx context.Context) *OrganizationsApisKeyvaluemapsEntriesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) Header() http.Header { +func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -14585,16 +18010,11 @@ func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) doRequ } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1attribute) - 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -14605,14 +18025,14 @@ func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.attributes.updateApiProductAttribute" call. -// Exactly one of *GoogleCloudApigeeV1Attribute or error will be +// Do executes the "apigee.organizations.apis.keyvaluemaps.entries.delete" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Attribute.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 +// either *GoogleCloudApigeeV1KeyValueEntry.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 *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { +func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14631,7 +18051,7 @@ func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Attribute{ + ret := &GoogleCloudApigeeV1KeyValueEntry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14643,28 +18063,25 @@ func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) Do(opt } return ret, nil // { - // "description": "Updates the value of an API product attribute. **Note**: OAuth access tokens and Key Management Service (KMS) entities (apps, developers, and API products) are cached for 180 seconds (current default). Any custom attributes associated with entities also get cached for at least 180 seconds after entity is accessed during runtime. In this case, the `ExpiresIn` element on the OAuthV2 policy won't be able to expire an access token in less than 180 seconds.", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/attributes/{attributesId}", - // "httpMethod": "POST", - // "id": "apigee.organizations.apiproducts.attributes.updateApiProductAttribute", + // "description": "Deletes a key value entry from a key value map scoped to an organization, environment, or API proxy. **Note:** After you delete the key value entry, the policy consuming the entry will continue to function with its cached values for a few minutes. This is expected behavior.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.apis.keyvaluemaps.entries.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the API product. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}`", + // "description": "Required. Scope as indicated by the URI in which to delete the key value map entry. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/entries/{entry}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}/entries/{entry}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{entry}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/apiproducts/[^/]+/attributes/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1Attribute" - // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Attribute" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14673,99 +18090,104 @@ func (c *OrganizationsApiproductsAttributesUpdateApiProductAttributeCall) Do(opt } -// method id "apigee.organizations.apiproducts.rateplans.create": +// method id "apigee.organizations.apis.keyvaluemaps.entries.get": -type OrganizationsApiproductsRateplansCreateCall struct { - s *Service - parent string - googlecloudapigeev1rateplan *GoogleCloudApigeeV1RatePlan - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApisKeyvaluemapsEntriesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Create a rate plan that is associated with an API product in -// an organization. Using rate plans, API product owners can monetize -// their API products by configuring one or more of the following: - -// Billing frequency - Initial setup fees for using an API product - -// Payment funding model (postpaid only) - Fixed recurring or -// consumption-based charges for using an API product - Revenue sharing -// with developer partners An API product can have multiple rate plans -// associated with it but *only one* rate plan can be active at any -// point of time. **Note: From the developer's perspective, they -// purchase API products not rate plans. +// Get: Get the Key value entry value for org, env or apis scoped Key +// value map. // -// - parent: Name of the API product that is associated with the rate -// plan. Use the following structure in your request: -// `organizations/{org}/apiproducts/{apiproduct}`. -func (r *OrganizationsApiproductsRateplansService) Create(parent string, googlecloudapigeev1rateplan *GoogleCloudApigeeV1RatePlan) *OrganizationsApiproductsRateplansCreateCall { - c := &OrganizationsApiproductsRateplansCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1rateplan = googlecloudapigeev1rateplan +// - name: Scope as indicated by the URI in which to fetch the key value +// map entry/value. Use **one** of the following structures in your +// request: * +// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/ +// entries/{entry}`. * +// `organizations/{organization}/environments/{environment}/keyvaluemap +// s/{keyvaluemap}/entries/{entry}` * +// `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{en +// try}`. +func (r *OrganizationsApisKeyvaluemapsEntriesService) Get(name string) *OrganizationsApisKeyvaluemapsEntriesGetCall { + c := &OrganizationsApisKeyvaluemapsEntriesGetCall{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 *OrganizationsApiproductsRateplansCreateCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsRateplansCreateCall { +func (c *OrganizationsApisKeyvaluemapsEntriesGetCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsEntriesGetCall { 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 *OrganizationsApisKeyvaluemapsEntriesGetCall) IfNoneMatch(entityTag string) *OrganizationsApisKeyvaluemapsEntriesGetCall { + 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 *OrganizationsApiproductsRateplansCreateCall) Context(ctx context.Context) *OrganizationsApiproductsRateplansCreateCall { +func (c *OrganizationsApisKeyvaluemapsEntriesGetCall) Context(ctx context.Context) *OrganizationsApisKeyvaluemapsEntriesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsRateplansCreateCall) Header() http.Header { +func (c *OrganizationsApisKeyvaluemapsEntriesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsRateplansCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisKeyvaluemapsEntriesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1rateplan) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rateplans") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.rateplans.create" call. -// Exactly one of *GoogleCloudApigeeV1RatePlan or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1RatePlan.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 +// Do executes the "apigee.organizations.apis.keyvaluemaps.entries.get" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1KeyValueEntry.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 *OrganizationsApiproductsRateplansCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1RatePlan, error) { +func (c *OrganizationsApisKeyvaluemapsEntriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14784,7 +18206,7 @@ func (c *OrganizationsApiproductsRateplansCreateCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1RatePlan{ + ret := &GoogleCloudApigeeV1KeyValueEntry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14796,28 +18218,25 @@ func (c *OrganizationsApiproductsRateplansCreateCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Create a rate plan that is associated with an API product in an organization. Using rate plans, API product owners can monetize their API products by configuring one or more of the following: - Billing frequency - Initial setup fees for using an API product - Payment funding model (postpaid only) - Fixed recurring or consumption-based charges for using an API product - Revenue sharing with developer partners An API product can have multiple rate plans associated with it but *only one* rate plan can be active at any point of time. **Note: From the developer's perspective, they purchase API products not rate plans.", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/rateplans", - // "httpMethod": "POST", - // "id": "apigee.organizations.apiproducts.rateplans.create", + // "description": "Get the Key value entry value for org, env or apis scoped Key value map.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.apis.keyvaluemaps.entries.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name of the API product that is associated with the rate plan. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}`", + // "name": { + // "description": "Required. Scope as indicated by the URI in which to fetch the key value map entry/value. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/entries/{entry}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}/entries/{entry}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{entry}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/apiproducts/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/rateplans", - // "request": { - // "$ref": "GoogleCloudApigeeV1RatePlan" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1RatePlan" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14826,83 +18245,120 @@ func (c *OrganizationsApiproductsRateplansCreateCall) Do(opts ...googleapi.CallO } -// method id "apigee.organizations.apiproducts.rateplans.delete": +// method id "apigee.organizations.apis.keyvaluemaps.entries.list": -type OrganizationsApiproductsRateplansDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApisKeyvaluemapsEntriesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a rate plan. +// List: Lists key value entries for key values maps scoped to an +// organization, environment, or API proxy. // -// - name: ID of the rate plan. Use the following structure in your -// request: -// `organizations/{org}/apiproducts/{apiproduct}/rateplans/{rateplan}`. -func (r *OrganizationsApiproductsRateplansService) Delete(name string) *OrganizationsApiproductsRateplansDeleteCall { - c := &OrganizationsApiproductsRateplansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Scope as indicated by the URI in which to list key value +// maps. Use **one** of the following structures in your request: * +// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}` +// . * +// `organizations/{organization}/environments/{environment}/keyvaluemap +// s/{keyvaluemap}` * +// `organizations/{organization}/keyvaluemaps/{keyvaluemap}`. +func (r *OrganizationsApisKeyvaluemapsEntriesService) List(parent string) *OrganizationsApisKeyvaluemapsEntriesListCall { + c := &OrganizationsApisKeyvaluemapsEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// key value entries to return. If unspecified, at most 100 entries will +// be returned. +func (c *OrganizationsApisKeyvaluemapsEntriesListCall) PageSize(pageSize int64) *OrganizationsApisKeyvaluemapsEntriesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token. If +// provides, must be a valid key value entry returned from a previous +// call that can be used to retrieve the next page. +func (c *OrganizationsApisKeyvaluemapsEntriesListCall) PageToken(pageToken string) *OrganizationsApisKeyvaluemapsEntriesListCall { + 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 *OrganizationsApiproductsRateplansDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsRateplansDeleteCall { +func (c *OrganizationsApisKeyvaluemapsEntriesListCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsEntriesListCall { 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 *OrganizationsApisKeyvaluemapsEntriesListCall) IfNoneMatch(entityTag string) *OrganizationsApisKeyvaluemapsEntriesListCall { + 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 *OrganizationsApiproductsRateplansDeleteCall) Context(ctx context.Context) *OrganizationsApiproductsRateplansDeleteCall { +func (c *OrganizationsApisKeyvaluemapsEntriesListCall) Context(ctx context.Context) *OrganizationsApisKeyvaluemapsEntriesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsRateplansDeleteCall) Header() http.Header { +func (c *OrganizationsApisKeyvaluemapsEntriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsRateplansDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisKeyvaluemapsEntriesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.rateplans.delete" call. -// Exactly one of *GoogleCloudApigeeV1RatePlan or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1RatePlan.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 *OrganizationsApiproductsRateplansDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1RatePlan, error) { +// Do executes the "apigee.organizations.apis.keyvaluemaps.entries.list" call. +// Exactly one of *GoogleCloudApigeeV1ListKeyValueEntriesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListKeyValueEntriesResponse.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 *OrganizationsApisKeyvaluemapsEntriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListKeyValueEntriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14921,7 +18377,7 @@ func (c *OrganizationsApiproductsRateplansDeleteCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1RatePlan{ + ret := &GoogleCloudApigeeV1ListKeyValueEntriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14933,25 +18389,36 @@ func (c *OrganizationsApiproductsRateplansDeleteCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Deletes a rate plan.", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/rateplans/{rateplansId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.apiproducts.rateplans.delete", + // "description": "Lists key value entries for key values maps scoped to an organization, environment, or API proxy.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps/{keyvaluemapsId}/entries", + // "httpMethod": "GET", + // "id": "apigee.organizations.apis.keyvaluemaps.entries.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. ID of the rate plan. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}/rateplans/{rateplan}`", + // "pageSize": { + // "description": "Optional. Maximum number of key value entries to return. If unspecified, at most 100 entries will be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token. If provides, must be a valid key value entry returned from a previous call that can be used to retrieve the next page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Scope as indicated by the URI in which to list key value maps. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/apiproducts/[^/]+/rateplans/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/entries", // "response": { - // "$ref": "GoogleCloudApigeeV1RatePlan" + // "$ref": "GoogleCloudApigeeV1ListKeyValueEntriesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14960,24 +18427,45 @@ func (c *OrganizationsApiproductsRateplansDeleteCall) Do(opts ...googleapi.CallO } -// method id "apigee.organizations.apiproducts.rateplans.get": +// 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 *OrganizationsApisKeyvaluemapsEntriesListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListKeyValueEntriesResponse) 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) + } +} -type OrganizationsApiproductsRateplansGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "apigee.organizations.apis.revisions.delete": + +type OrganizationsApisRevisionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the details of a rate plan. +// Delete: Deletes an API proxy revision and all policies, resources, +// endpoints, and revisions associated with it. The API proxy revision +// must be undeployed before you can delete it. // -// - name: Name of the rate plan. Use the following structure in your -// request: -// `organizations/{org}/apiproducts/{apiproduct}/rateplans/{rateplan}`. -func (r *OrganizationsApiproductsRateplansService) Get(name string) *OrganizationsApiproductsRateplansGetCall { - c := &OrganizationsApiproductsRateplansGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: API proxy revision in the following format: +// `organizations/{org}/apis/{api}/revisions/{rev}`. +func (r *OrganizationsApisRevisionsService) Delete(name string) *OrganizationsApisRevisionsDeleteCall { + c := &OrganizationsApisRevisionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -14985,54 +18473,41 @@ func (r *OrganizationsApiproductsRateplansService) Get(name string) *Organizatio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApiproductsRateplansGetCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsRateplansGetCall { +func (c *OrganizationsApisRevisionsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApisRevisionsDeleteCall { 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 *OrganizationsApiproductsRateplansGetCall) IfNoneMatch(entityTag string) *OrganizationsApiproductsRateplansGetCall { - 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 *OrganizationsApiproductsRateplansGetCall) Context(ctx context.Context) *OrganizationsApiproductsRateplansGetCall { +func (c *OrganizationsApisRevisionsDeleteCall) Context(ctx context.Context) *OrganizationsApisRevisionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsRateplansGetCall) Header() http.Header { +func (c *OrganizationsApisRevisionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsRateplansGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisRevisionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -15043,14 +18518,15 @@ func (c *OrganizationsApiproductsRateplansGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.rateplans.get" call. -// Exactly one of *GoogleCloudApigeeV1RatePlan or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1RatePlan.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 *OrganizationsApiproductsRateplansGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1RatePlan, error) { +// Do executes the "apigee.organizations.apis.revisions.delete" call. +// Exactly one of *GoogleCloudApigeeV1ApiProxyRevision or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1ApiProxyRevision.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 *OrganizationsApisRevisionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProxyRevision, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15069,7 +18545,7 @@ func (c *OrganizationsApiproductsRateplansGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1RatePlan{ + ret := &GoogleCloudApigeeV1ApiProxyRevision{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15081,25 +18557,25 @@ func (c *OrganizationsApiproductsRateplansGetCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Gets the details of a rate plan.", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/rateplans/{rateplansId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.apiproducts.rateplans.get", + // "description": "Deletes an API proxy revision and all policies, resources, endpoints, and revisions associated with it. The API proxy revision must be undeployed before you can delete it.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/revisions/{revisionsId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.apis.revisions.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the rate plan. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}/rateplans/{rateplan}`", + // "description": "Required. API proxy revision in the following format: `organizations/{org}/apis/{api}/revisions/{rev}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apiproducts/[^/]+/rateplans/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1RatePlan" + // "$ref": "GoogleCloudApigeeV1ApiProxyRevision" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15108,85 +18584,45 @@ func (c *OrganizationsApiproductsRateplansGetCall) Do(opts ...googleapi.CallOpti } -// method id "apigee.organizations.apiproducts.rateplans.list": +// method id "apigee.organizations.apis.revisions.get": -type OrganizationsApiproductsRateplansListCall struct { +type OrganizationsApisRevisionsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all the rate plans for an API product. +// Get: Gets an API proxy revision. To download the API proxy +// configuration bundle for the specified revision as a zip file, set +// the `format` query parameter to `bundle`. If you are using curl, +// specify `-o filename.zip` to save the output to a file; otherwise, it +// displays to `stdout`. Then, develop the API proxy configuration +// locally and upload the updated API proxy configuration revision, as +// described in updateApiProxyRevision (updateApiProxyRevision). // -// - parent: Name of the API product. Use the following structure in -// your request: `organizations/{org}/apiproducts/{apiproduct}` Use -// `organizations/{org}/apiproducts/-` to return rate plans for all -// API products within the organization. -func (r *OrganizationsApiproductsRateplansService) List(parent string) *OrganizationsApiproductsRateplansListCall { - c := &OrganizationsApiproductsRateplansListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Count sets the optional parameter "count": Number of rate plans to -// return in the API call. Use with the `startKey` parameter to provide -// more targeted filtering. The maximum limit is 1000. Defaults to 100. -func (c *OrganizationsApiproductsRateplansListCall) Count(count int64) *OrganizationsApiproductsRateplansListCall { - c.urlParams_.Set("count", fmt.Sprint(count)) - return c -} - -// Expand sets the optional parameter "expand": Flag that specifies -// whether to expand the results. Set to `true` to get expanded details -// about each API. Defaults to `false`. -func (c *OrganizationsApiproductsRateplansListCall) Expand(expand bool) *OrganizationsApiproductsRateplansListCall { - c.urlParams_.Set("expand", fmt.Sprint(expand)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Name of the attribute -// used for sorting. Valid values include: * `name`: Name of the rate -// plan. * `state`: State of the rate plan (`DRAFT`, `PUBLISHED`). * -// `startTime`: Time when the rate plan becomes active. * `endTime`: -// Time when the rate plan expires. **Note**: Not supported by Apigee at -// this time. -func (c *OrganizationsApiproductsRateplansListCall) OrderBy(orderBy string) *OrganizationsApiproductsRateplansListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// StartKey sets the optional parameter "startKey": Name of the rate -// plan from which to start displaying the list of rate plans. If -// omitted, the list starts from the first item. For example, to view -// the rate plans from 51-150, set the value of `startKey` to the name -// of the 51st rate plan and set the value of `count` to 100. -func (c *OrganizationsApiproductsRateplansListCall) StartKey(startKey string) *OrganizationsApiproductsRateplansListCall { - c.urlParams_.Set("startKey", startKey) +// - name: API proxy revision in the following format: +// `organizations/{org}/apis/{api}/revisions/{rev}`. +func (r *OrganizationsApisRevisionsService) Get(name string) *OrganizationsApisRevisionsGetCall { + c := &OrganizationsApisRevisionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// State sets the optional parameter "state": State of the rate plans -// (`DRAFT`, `PUBLISHED`) that you want to display. -// -// Possible values: -// "STATE_UNSPECIFIED" - State of the rate plan is not specified. -// "DRAFT" - Rate plan is in draft mode and only visible to API -// providers. -// "PUBLISHED" - Rate plan is published and will become visible to -// developers for the configured duration (between `startTime` and -// `endTime`). -func (c *OrganizationsApiproductsRateplansListCall) State(state string) *OrganizationsApiproductsRateplansListCall { - c.urlParams_.Set("state", state) +// Format sets the optional parameter "format": Format used when +// downloading the API proxy configuration revision. Set to `bundle` to +// download the API proxy configuration revision as a zip file. +func (c *OrganizationsApisRevisionsGetCall) Format(format string) *OrganizationsApisRevisionsGetCall { + c.urlParams_.Set("format", format) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApiproductsRateplansListCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsRateplansListCall { +func (c *OrganizationsApisRevisionsGetCall) Fields(s ...googleapi.Field) *OrganizationsApisRevisionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15196,7 +18632,7 @@ func (c *OrganizationsApiproductsRateplansListCall) Fields(s ...googleapi.Field) // 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 *OrganizationsApiproductsRateplansListCall) IfNoneMatch(entityTag string) *OrganizationsApiproductsRateplansListCall { +func (c *OrganizationsApisRevisionsGetCall) IfNoneMatch(entityTag string) *OrganizationsApisRevisionsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -15204,21 +18640,21 @@ func (c *OrganizationsApiproductsRateplansListCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsApiproductsRateplansListCall) Context(ctx context.Context) *OrganizationsApiproductsRateplansListCall { +func (c *OrganizationsApisRevisionsGetCall) Context(ctx context.Context) *OrganizationsApisRevisionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsRateplansListCall) Header() http.Header { +func (c *OrganizationsApisRevisionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsRateplansListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisRevisionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15231,7 +18667,7 @@ func (c *OrganizationsApiproductsRateplansListCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rateplans") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15239,21 +18675,19 @@ func (c *OrganizationsApiproductsRateplansListCall) doRequest(alt string) (*http } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.rateplans.list" call. -// Exactly one of *GoogleCloudApigeeV1ListRatePlansResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListRatePlansResponse.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 *OrganizationsApiproductsRateplansListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListRatePlansResponse, error) { +// Do executes the "apigee.organizations.apis.revisions.get" call. +// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.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 *OrganizationsApisRevisionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15272,7 +18706,7 @@ func (c *OrganizationsApiproductsRateplansListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListRatePlansResponse{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15284,61 +18718,30 @@ func (c *OrganizationsApiproductsRateplansListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Lists all the rate plans for an API product.", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/rateplans", + // "description": "Gets an API proxy revision. To download the API proxy configuration bundle for the specified revision as a zip file, set the `format` query parameter to `bundle`. If you are using curl, specify `-o filename.zip` to save the output to a file; otherwise, it displays to `stdout`. Then, develop the API proxy configuration locally and upload the updated API proxy configuration revision, as described in [updateApiProxyRevision](updateApiProxyRevision).", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/revisions/{revisionsId}", // "httpMethod": "GET", - // "id": "apigee.organizations.apiproducts.rateplans.list", + // "id": "apigee.organizations.apis.revisions.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "count": { - // "description": "Number of rate plans to return in the API call. Use with the `startKey` parameter to provide more targeted filtering. The maximum limit is 1000. Defaults to 100.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "expand": { - // "description": "Flag that specifies whether to expand the results. Set to `true` to get expanded details about each API. Defaults to `false`.", - // "location": "query", - // "type": "boolean" - // }, - // "orderBy": { - // "description": "Name of the attribute used for sorting. Valid values include: * `name`: Name of the rate plan. * `state`: State of the rate plan (`DRAFT`, `PUBLISHED`). * `startTime`: Time when the rate plan becomes active. * `endTime`: Time when the rate plan expires. **Note**: Not supported by Apigee at this time.", + // "format": { + // "description": "Format used when downloading the API proxy configuration revision. Set to `bundle` to download the API proxy configuration revision as a zip file.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. Name of the API product. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}` Use `organizations/{org}/apiproducts/-` to return rate plans for all API products within the organization.", + // "name": { + // "description": "Required. API proxy revision in the following format: `organizations/{org}/apis/{api}/revisions/{rev}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apiproducts/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" - // }, - // "startKey": { - // "description": "Name of the rate plan from which to start displaying the list of rate plans. If omitted, the list starts from the first item. For example, to view the rate plans from 51-150, set the value of `startKey` to the name of the 51st rate plan and set the value of `count` to 100.", - // "location": "query", - // "type": "string" - // }, - // "state": { - // "description": "State of the rate plans (`DRAFT`, `PUBLISHED`) that you want to display.", - // "enum": [ - // "STATE_UNSPECIFIED", - // "DRAFT", - // "PUBLISHED" - // ], - // "enumDescriptions": [ - // "State of the rate plan is not specified.", - // "Rate plan is in draft mode and only visible to API providers.", - // "Rate plan is published and will become visible to developers for the configured duration (between `startTime` and `endTime`)." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/rateplans", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListRatePlansResponse" + // "$ref": "GoogleApiHttpBody" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15347,33 +18750,45 @@ func (c *OrganizationsApiproductsRateplansListCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.apiproducts.rateplans.update": +// method id "apigee.organizations.apis.revisions.updateApiProxyRevision": -type OrganizationsApiproductsRateplansUpdateCall struct { - s *Service - name string - googlecloudapigeev1rateplan *GoogleCloudApigeeV1RatePlan - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApisRevisionsUpdateApiProxyRevisionCall struct { + s *Service + name string + googleapihttpbody *GoogleApiHttpBody + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates an existing rate plan. +// UpdateApiProxyRevision: Updates an existing API proxy revision by +// uploading the API proxy configuration bundle as a zip file from your +// local machine. You can update only API proxy revisions that have +// never been deployed. After deployment, an API proxy revision becomes +// immutable, even if it is undeployed. Set the `Content-Type` header to +// either `multipart/form-data` or `application/octet-stream`. // -// - name: Name of the rate plan. Use the following structure in your -// request: -// `organizations/{org}/apiproducts/{apiproduct}/rateplans/{rateplan}`. -func (r *OrganizationsApiproductsRateplansService) Update(name string, googlecloudapigeev1rateplan *GoogleCloudApigeeV1RatePlan) *OrganizationsApiproductsRateplansUpdateCall { - c := &OrganizationsApiproductsRateplansUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: API proxy revision to update in the following format: +// `organizations/{org}/apis/{api}/revisions/{rev}`. +func (r *OrganizationsApisRevisionsService) UpdateApiProxyRevision(name string, googleapihttpbody *GoogleApiHttpBody) *OrganizationsApisRevisionsUpdateApiProxyRevisionCall { + c := &OrganizationsApisRevisionsUpdateApiProxyRevisionCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1rateplan = googlecloudapigeev1rateplan + c.googleapihttpbody = googleapihttpbody + return c +} + +// Validate sets the optional parameter "validate": Ignored. All uploads +// are validated regardless of the value of this field. Maintained for +// compatibility with Apigee Edge API. +func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Validate(validate bool) *OrganizationsApisRevisionsUpdateApiProxyRevisionCall { + c.urlParams_.Set("validate", fmt.Sprint(validate)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApiproductsRateplansUpdateCall) Fields(s ...googleapi.Field) *OrganizationsApiproductsRateplansUpdateCall { +func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Fields(s ...googleapi.Field) *OrganizationsApisRevisionsUpdateApiProxyRevisionCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15381,21 +18796,21 @@ func (c *OrganizationsApiproductsRateplansUpdateCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsApiproductsRateplansUpdateCall) Context(ctx context.Context) *OrganizationsApiproductsRateplansUpdateCall { +func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Context(ctx context.Context) *OrganizationsApisRevisionsUpdateApiProxyRevisionCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApiproductsRateplansUpdateCall) Header() http.Header { +func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApiproductsRateplansUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15403,7 +18818,7 @@ func (c *OrganizationsApiproductsRateplansUpdateCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1rateplan) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) if err != nil { return nil, err } @@ -15412,7 +18827,7 @@ func (c *OrganizationsApiproductsRateplansUpdateCall) doRequest(alt string) (*ht c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -15423,14 +18838,15 @@ func (c *OrganizationsApiproductsRateplansUpdateCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apiproducts.rateplans.update" call. -// Exactly one of *GoogleCloudApigeeV1RatePlan or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1RatePlan.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 *OrganizationsApiproductsRateplansUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1RatePlan, error) { +// Do executes the "apigee.organizations.apis.revisions.updateApiProxyRevision" call. +// Exactly one of *GoogleCloudApigeeV1ApiProxyRevision or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1ApiProxyRevision.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 *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProxyRevision, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15449,7 +18865,7 @@ func (c *OrganizationsApiproductsRateplansUpdateCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1RatePlan{ + ret := &GoogleCloudApigeeV1ApiProxyRevision{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15461,28 +18877,33 @@ func (c *OrganizationsApiproductsRateplansUpdateCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Updates an existing rate plan.", - // "flatPath": "v1/organizations/{organizationsId}/apiproducts/{apiproductsId}/rateplans/{rateplansId}", - // "httpMethod": "PUT", - // "id": "apigee.organizations.apiproducts.rateplans.update", + // "description": "Updates an existing API proxy revision by uploading the API proxy configuration bundle as a zip file from your local machine. You can update only API proxy revisions that have never been deployed. After deployment, an API proxy revision becomes immutable, even if it is undeployed. Set the `Content-Type` header to either `multipart/form-data` or `application/octet-stream`.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/revisions/{revisionsId}", + // "httpMethod": "POST", + // "id": "apigee.organizations.apis.revisions.updateApiProxyRevision", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the rate plan. Use the following structure in your request: `organizations/{org}/apiproducts/{apiproduct}/rateplans/{rateplan}`", + // "description": "Required. API proxy revision to update in the following format: `organizations/{org}/apis/{api}/revisions/{rev}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apiproducts/[^/]+/rateplans/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" + // }, + // "validate": { + // "description": "Ignored. All uploads are validated regardless of the value of this field. Maintained for compatibility with Apigee Edge API.", + // "location": "query", + // "type": "boolean" // } // }, // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudApigeeV1RatePlan" + // "$ref": "GoogleApiHttpBody" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1RatePlan" + // "$ref": "GoogleCloudApigeeV1ApiProxyRevision" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15491,111 +18912,79 @@ func (c *OrganizationsApiproductsRateplansUpdateCall) Do(opts ...googleapi.CallO } -// method id "apigee.organizations.apis.create": +// method id "apigee.organizations.apis.revisions.deployments.list": -type OrganizationsApisCreateCall struct { - s *Service - parent string - googleapihttpbody *GoogleApiHttpBody - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsApisRevisionsDeploymentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates an API proxy. The API proxy created will not be -// accessible at runtime until it is deployed to an environment. Create -// a new API proxy by setting the `name` query parameter to the name of -// the API proxy. Import an API proxy configuration bundle stored in zip -// format on your local machine to your organization by doing the -// following: * Set the `name` query parameter to the name of the API -// proxy. * Set the `action` query parameter to `import`. * Set the -// `Content-Type` header to `multipart/form-data`. * Pass as a file the -// name of API proxy configuration bundle stored in zip format on your -// local machine using the `file` form field. **Note**: To validate the -// API proxy configuration bundle only without importing it, set the -// `action` query parameter to `validate`. When importing an API proxy -// configuration bundle, if the API proxy does not exist, it will be -// created. If the API proxy exists, then a new revision is created. -// Invalid API proxy configurations are rejected, and a list of -// validation errors is returned to the client. +// List: Lists all deployments of an API proxy revision. // -// - parent: Name of the organization in the following format: -// `organizations/{org}`. -func (r *OrganizationsApisService) Create(parent string, googleapihttpbody *GoogleApiHttpBody) *OrganizationsApisCreateCall { - c := &OrganizationsApisCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the API proxy revision for which to return +// deployment information in the following format: +// `organizations/{org}/apis/{api}/revisions/{rev}`. +func (r *OrganizationsApisRevisionsDeploymentsService) List(parent string) *OrganizationsApisRevisionsDeploymentsListCall { + c := &OrganizationsApisRevisionsDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleapihttpbody = googleapihttpbody - return c -} - -// Action sets the optional parameter "action": Action to perform when -// importing an API proxy configuration bundle. Set this parameter to -// one of the following values: * `import` to import the API proxy -// configuration bundle. * `validate` to validate the API proxy -// configuration bundle without importing it. -func (c *OrganizationsApisCreateCall) Action(action string) *OrganizationsApisCreateCall { - c.urlParams_.Set("action", action) - return c -} - -// Name sets the optional parameter "name": Name of the API proxy. -// Restrict the characters used to: A-Za-z0-9._- -func (c *OrganizationsApisCreateCall) Name(name string) *OrganizationsApisCreateCall { - c.urlParams_.Set("name", name) - return c -} - -// Validate sets the optional parameter "validate": Ignored. All uploads -// are validated regardless of the value of this field. Maintained for -// compatibility with Apigee Edge API. -func (c *OrganizationsApisCreateCall) Validate(validate bool) *OrganizationsApisCreateCall { - c.urlParams_.Set("validate", fmt.Sprint(validate)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApisCreateCall) Fields(s ...googleapi.Field) *OrganizationsApisCreateCall { +func (c *OrganizationsApisRevisionsDeploymentsListCall) Fields(s ...googleapi.Field) *OrganizationsApisRevisionsDeploymentsListCall { 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 *OrganizationsApisRevisionsDeploymentsListCall) IfNoneMatch(entityTag string) *OrganizationsApisRevisionsDeploymentsListCall { + 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 *OrganizationsApisCreateCall) Context(ctx context.Context) *OrganizationsApisCreateCall { +func (c *OrganizationsApisRevisionsDeploymentsListCall) Context(ctx context.Context) *OrganizationsApisRevisionsDeploymentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisCreateCall) Header() http.Header { +func (c *OrganizationsApisRevisionsDeploymentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsApisRevisionsDeploymentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googleapihttpbody) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apis") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -15606,15 +18995,16 @@ func (c *OrganizationsApisCreateCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.create" call. -// Exactly one of *GoogleCloudApigeeV1ApiProxyRevision or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1ApiProxyRevision.ServerResponse.Header or +// Do executes the "apigee.organizations.apis.revisions.deployments.list" call. +// Exactly one of *GoogleCloudApigeeV1ListDeploymentsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListDeploymentsResponse.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 *OrganizationsApisCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProxyRevision, error) { +func (c *OrganizationsApisRevisionsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeploymentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15633,7 +19023,7 @@ func (c *OrganizationsApisCreateCall) Do(opts ...googleapi.CallOption) (*GoogleC if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ApiProxyRevision{ + ret := &GoogleCloudApigeeV1ListDeploymentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15645,43 +19035,25 @@ func (c *OrganizationsApisCreateCall) Do(opts ...googleapi.CallOption) (*GoogleC } return ret, nil // { - // "description": "Creates an API proxy. The API proxy created will not be accessible at runtime until it is deployed to an environment. Create a new API proxy by setting the `name` query parameter to the name of the API proxy. Import an API proxy configuration bundle stored in zip format on your local machine to your organization by doing the following: * Set the `name` query parameter to the name of the API proxy. * Set the `action` query parameter to `import`. * Set the `Content-Type` header to `multipart/form-data`. * Pass as a file the name of API proxy configuration bundle stored in zip format on your local machine using the `file` form field. **Note**: To validate the API proxy configuration bundle only without importing it, set the `action` query parameter to `validate`. When importing an API proxy configuration bundle, if the API proxy does not exist, it will be created. If the API proxy exists, then a new revision is created. Invalid API proxy configurations are rejected, and a list of validation errors is returned to the client.", - // "flatPath": "v1/organizations/{organizationsId}/apis", - // "httpMethod": "POST", - // "id": "apigee.organizations.apis.create", + // "description": "Lists all deployments of an API proxy revision.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/revisions/{revisionsId}/deployments", + // "httpMethod": "GET", + // "id": "apigee.organizations.apis.revisions.deployments.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "action": { - // "description": "Action to perform when importing an API proxy configuration bundle. Set this parameter to one of the following values: * `import` to import the API proxy configuration bundle. * `validate` to validate the API proxy configuration bundle without importing it.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "Name of the API proxy. Restrict the characters used to: A-Za-z0-9._-", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. Name of the organization in the following format: `organizations/{org}`", + // "description": "Required. Name of the API proxy revision for which to return deployment information in the following format: `organizations/{org}/apis/{api}/revisions/{rev}`.", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" - // }, - // "validate": { - // "description": "Ignored. All uploads are validated regardless of the value of this field. Maintained for compatibility with Apigee Edge API.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1/{+parent}/apis", - // "request": { - // "$ref": "GoogleApiHttpBody" - // }, + // "path": "v1/{+parent}/deployments", // "response": { - // "$ref": "GoogleCloudApigeeV1ApiProxyRevision" + // "$ref": "GoogleCloudApigeeV1ListDeploymentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15690,24 +19062,23 @@ func (c *OrganizationsApisCreateCall) Do(opts ...googleapi.CallOption) (*GoogleC } -// method id "apigee.organizations.apis.delete": +// method id "apigee.organizations.apps.get": -type OrganizationsApisDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsAppsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an API proxy and all associated endpoints, policies, -// resources, and revisions. The API proxy must be undeployed before you -// can delete it. +// Get: Gets the app profile for the specified app ID. // -// - name: Name of the API proxy in the following format: -// `organizations/{org}/apis/{api}`. -func (r *OrganizationsApisService) Delete(name string) *OrganizationsApisDeleteCall { - c := &OrganizationsApisDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: App ID in the following format: +// `organizations/{org}/apps/{app}`. +func (r *OrganizationsAppsService) Get(name string) *OrganizationsAppsGetCall { + c := &OrganizationsAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -15715,41 +19086,54 @@ func (r *OrganizationsApisService) Delete(name string) *OrganizationsApisDeleteC // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApisDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApisDeleteCall { +func (c *OrganizationsAppsGetCall) Fields(s ...googleapi.Field) *OrganizationsAppsGetCall { 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 *OrganizationsAppsGetCall) IfNoneMatch(entityTag string) *OrganizationsAppsGetCall { + 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 *OrganizationsApisDeleteCall) Context(ctx context.Context) *OrganizationsApisDeleteCall { +func (c *OrganizationsAppsGetCall) Context(ctx context.Context) *OrganizationsAppsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisDeleteCall) Header() http.Header { +func (c *OrganizationsAppsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsAppsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -15760,14 +19144,14 @@ func (c *OrganizationsApisDeleteCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.delete" call. -// Exactly one of *GoogleCloudApigeeV1ApiProxy or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1ApiProxy.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.apps.get" call. +// Exactly one of *GoogleCloudApigeeV1App or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1App.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 *OrganizationsApisDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProxy, error) { +func (c *OrganizationsAppsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1App, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15786,7 +19170,7 @@ func (c *OrganizationsApisDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleC if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ApiProxy{ + ret := &GoogleCloudApigeeV1App{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15798,25 +19182,25 @@ func (c *OrganizationsApisDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleC } return ret, nil // { - // "description": "Deletes an API proxy and all associated endpoints, policies, resources, and revisions. The API proxy must be undeployed before you can delete it.", - // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.apis.delete", + // "description": "Gets the app profile for the specified app ID.", + // "flatPath": "v1/organizations/{organizationsId}/apps/{appsId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.apps.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the API proxy in the following format: `organizations/{org}/apis/{api}`", + // "description": "Required. App ID in the following format: `organizations/{org}/apps/{app}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apis/[^/]+$", + // "pattern": "^organizations/[^/]+/apps/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ApiProxy" + // "$ref": "GoogleCloudApigeeV1App" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15825,31 +19209,99 @@ func (c *OrganizationsApisDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleC } -// method id "apigee.organizations.apis.get": +// method id "apigee.organizations.apps.list": -type OrganizationsApisGetCall struct { +type OrganizationsAppsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets an API proxy including a list of existing revisions. +// List: Lists IDs of apps within an organization that have the +// specified app status (approved or revoked) or are of the specified +// app type (developer or company). // -// - name: Name of the API proxy in the following format: -// `organizations/{org}/apis/{api}`. -func (r *OrganizationsApisService) Get(name string) *OrganizationsApisGetCall { - c := &OrganizationsApisGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Resource path of the parent in the following format: +// `organizations/{org}`. +func (r *OrganizationsAppsService) List(parent string) *OrganizationsAppsListCall { + c := &OrganizationsAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// ApiProduct sets the optional parameter "apiProduct": API product. +func (c *OrganizationsAppsListCall) ApiProduct(apiProduct string) *OrganizationsAppsListCall { + c.urlParams_.Set("apiProduct", apiProduct) + return c +} + +// Apptype sets the optional parameter "apptype": Filter by the type of +// the app. Valid values are `company` or `developer`. Defaults to +// `developer`. +func (c *OrganizationsAppsListCall) Apptype(apptype string) *OrganizationsAppsListCall { + c.urlParams_.Set("apptype", apptype) + return c +} + +// Expand sets the optional parameter "expand": Flag that specifies +// whether to return an expanded list of apps for the organization. +// Defaults to `false`. +func (c *OrganizationsAppsListCall) Expand(expand bool) *OrganizationsAppsListCall { + c.urlParams_.Set("expand", fmt.Sprint(expand)) + return c +} + +// Ids sets the optional parameter "ids": Comma-separated list of app +// IDs on which to filter. +func (c *OrganizationsAppsListCall) Ids(ids string) *OrganizationsAppsListCall { + c.urlParams_.Set("ids", ids) + return c +} + +// IncludeCred sets the optional parameter "includeCred": Flag that +// specifies whether to include credentials in the response. +func (c *OrganizationsAppsListCall) IncludeCred(includeCred bool) *OrganizationsAppsListCall { + c.urlParams_.Set("includeCred", fmt.Sprint(includeCred)) + return c +} + +// KeyStatus sets the optional parameter "keyStatus": Key status of the +// app. Valid values include `approved` or `revoked`. Defaults to +// `approved`. +func (c *OrganizationsAppsListCall) KeyStatus(keyStatus string) *OrganizationsAppsListCall { + c.urlParams_.Set("keyStatus", keyStatus) + return c +} + +// Rows sets the optional parameter "rows": Maximum number of app IDs to +// return. Defaults to 10000. +func (c *OrganizationsAppsListCall) Rows(rows int64) *OrganizationsAppsListCall { + c.urlParams_.Set("rows", fmt.Sprint(rows)) + return c +} + +// StartKey sets the optional parameter "startKey": Returns the list of +// apps starting from the specified app ID. +func (c *OrganizationsAppsListCall) StartKey(startKey string) *OrganizationsAppsListCall { + c.urlParams_.Set("startKey", startKey) + return c +} + +// Status sets the optional parameter "status": Filter by the status of +// the app. Valid values are `approved` or `revoked`. Defaults to +// `approved`. +func (c *OrganizationsAppsListCall) Status(status string) *OrganizationsAppsListCall { + c.urlParams_.Set("status", status) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApisGetCall) Fields(s ...googleapi.Field) *OrganizationsApisGetCall { +func (c *OrganizationsAppsListCall) Fields(s ...googleapi.Field) *OrganizationsAppsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15859,7 +19311,7 @@ func (c *OrganizationsApisGetCall) Fields(s ...googleapi.Field) *OrganizationsAp // 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 *OrganizationsApisGetCall) IfNoneMatch(entityTag string) *OrganizationsApisGetCall { +func (c *OrganizationsAppsListCall) IfNoneMatch(entityTag string) *OrganizationsAppsListCall { c.ifNoneMatch_ = entityTag return c } @@ -15867,21 +19319,21 @@ func (c *OrganizationsApisGetCall) IfNoneMatch(entityTag string) *OrganizationsA // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsApisGetCall) Context(ctx context.Context) *OrganizationsApisGetCall { +func (c *OrganizationsAppsListCall) Context(ctx context.Context) *OrganizationsAppsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisGetCall) Header() http.Header { +func (c *OrganizationsAppsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsAppsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15894,7 +19346,7 @@ func (c *OrganizationsApisGetCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apps") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15902,19 +19354,20 @@ func (c *OrganizationsApisGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.get" call. -// Exactly one of *GoogleCloudApigeeV1ApiProxy or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1ApiProxy.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 *OrganizationsApisGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProxy, error) { +// Do executes the "apigee.organizations.apps.list" call. +// Exactly one of *GoogleCloudApigeeV1ListAppsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1ListAppsResponse.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 *OrganizationsAppsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListAppsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15933,7 +19386,7 @@ func (c *OrganizationsApisGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ApiProxy{ + ret := &GoogleCloudApigeeV1ListAppsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15945,25 +19398,71 @@ func (c *OrganizationsApisGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou } return ret, nil // { - // "description": "Gets an API proxy including a list of existing revisions.", - // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}", + // "description": "Lists IDs of apps within an organization that have the specified app status (approved or revoked) or are of the specified app type (developer or company).", + // "flatPath": "v1/organizations/{organizationsId}/apps", // "httpMethod": "GET", - // "id": "apigee.organizations.apis.get", + // "id": "apigee.organizations.apps.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the API proxy in the following format: `organizations/{org}/apis/{api}`", + // "apiProduct": { + // "description": "API product.", + // "location": "query", + // "type": "string" + // }, + // "apptype": { + // "description": "Optional. Filter by the type of the app. Valid values are `company` or `developer`. Defaults to `developer`.", + // "location": "query", + // "type": "string" + // }, + // "expand": { + // "description": "Optional. Flag that specifies whether to return an expanded list of apps for the organization. Defaults to `false`.", + // "location": "query", + // "type": "boolean" + // }, + // "ids": { + // "description": "Optional. Comma-separated list of app IDs on which to filter.", + // "location": "query", + // "type": "string" + // }, + // "includeCred": { + // "description": "Optional. Flag that specifies whether to include credentials in the response.", + // "location": "query", + // "type": "boolean" + // }, + // "keyStatus": { + // "description": "Optional. Key status of the app. Valid values include `approved` or `revoked`. Defaults to `approved`.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Resource path of the parent in the following format: `organizations/{org}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apis/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" + // }, + // "rows": { + // "description": "Optional. Maximum number of app IDs to return. Defaults to 10000.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "startKey": { + // "description": "Returns the list of apps starting from the specified app ID.", + // "location": "query", + // "type": "string" + // }, + // "status": { + // "description": "Optional. Filter by the status of the app. Valid values are `approved` or `revoked`. Defaults to `approved`.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/apps", // "response": { - // "$ref": "GoogleCloudApigeeV1ApiProxy" + // "$ref": "GoogleCloudApigeeV1ListAppsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15972,95 +19471,80 @@ func (c *OrganizationsApisGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou } -// method id "apigee.organizations.apis.list": +// method id "apigee.organizations.datacollectors.create": -type OrganizationsApisListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsDatacollectorsCreateCall struct { + s *Service + parent string + googlecloudapigeev1datacollector *GoogleCloudApigeeV1DataCollector + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the names of all API proxies in an organization. The -// names returned correspond to the names defined in the configuration -// files for each API proxy. +// Create: Creates a new data collector. // -// - parent: Name of the organization in the following format: -// `organizations/{org}`. -func (r *OrganizationsApisService) List(parent string) *OrganizationsApisListCall { - c := &OrganizationsApisListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the organization in which to create the data +// collector in the following format: `organizations/{org}`. +func (r *OrganizationsDatacollectorsService) Create(parent string, googlecloudapigeev1datacollector *GoogleCloudApigeeV1DataCollector) *OrganizationsDatacollectorsCreateCall { + c := &OrganizationsDatacollectorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.googlecloudapigeev1datacollector = googlecloudapigeev1datacollector return c } -// IncludeMetaData sets the optional parameter "includeMetaData": Flag -// that specifies whether to include API proxy metadata in the response. -func (c *OrganizationsApisListCall) IncludeMetaData(includeMetaData bool) *OrganizationsApisListCall { - c.urlParams_.Set("includeMetaData", fmt.Sprint(includeMetaData)) - return c -} - -// IncludeRevisions sets the optional parameter "includeRevisions": Flag -// that specifies whether to include a list of revisions in the -// response. -func (c *OrganizationsApisListCall) IncludeRevisions(includeRevisions bool) *OrganizationsApisListCall { - c.urlParams_.Set("includeRevisions", fmt.Sprint(includeRevisions)) +// DataCollectorId sets the optional parameter "dataCollectorId": ID of +// the data collector. Overrides any ID in the data collector resource. +// Must be a string beginning with `dc_` that contains only letters, +// numbers, and underscores. +func (c *OrganizationsDatacollectorsCreateCall) DataCollectorId(dataCollectorId string) *OrganizationsDatacollectorsCreateCall { + c.urlParams_.Set("dataCollectorId", dataCollectorId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApisListCall) Fields(s ...googleapi.Field) *OrganizationsApisListCall { +func (c *OrganizationsDatacollectorsCreateCall) Fields(s ...googleapi.Field) *OrganizationsDatacollectorsCreateCall { 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 *OrganizationsApisListCall) IfNoneMatch(entityTag string) *OrganizationsApisListCall { - 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 *OrganizationsApisListCall) Context(ctx context.Context) *OrganizationsApisListCall { +func (c *OrganizationsDatacollectorsCreateCall) Context(ctx context.Context) *OrganizationsDatacollectorsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisListCall) Header() http.Header { +func (c *OrganizationsDatacollectorsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDatacollectorsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1datacollector) + 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, "v1/{+parent}/apis") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datacollectors") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -16071,16 +19555,14 @@ func (c *OrganizationsApisListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.list" call. -// Exactly one of *GoogleCloudApigeeV1ListApiProxiesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListApiProxiesResponse.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 *OrganizationsApisListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListApiProxiesResponse, error) { +// Do executes the "apigee.organizations.datacollectors.create" call. +// Exactly one of *GoogleCloudApigeeV1DataCollector or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1DataCollector.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 *OrganizationsDatacollectorsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DataCollector, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16099,7 +19581,7 @@ func (c *OrganizationsApisListCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListApiProxiesResponse{ + ret := &GoogleCloudApigeeV1DataCollector{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16111,35 +19593,33 @@ func (c *OrganizationsApisListCall) Do(opts ...googleapi.CallOption) (*GoogleClo } return ret, nil // { - // "description": "Lists the names of all API proxies in an organization. The names returned correspond to the names defined in the configuration files for each API proxy.", - // "flatPath": "v1/organizations/{organizationsId}/apis", - // "httpMethod": "GET", - // "id": "apigee.organizations.apis.list", + // "description": "Creates a new data collector.", + // "flatPath": "v1/organizations/{organizationsId}/datacollectors", + // "httpMethod": "POST", + // "id": "apigee.organizations.datacollectors.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "includeMetaData": { - // "description": "Flag that specifies whether to include API proxy metadata in the response.", - // "location": "query", - // "type": "boolean" - // }, - // "includeRevisions": { - // "description": "Flag that specifies whether to include a list of revisions in the response.", + // "dataCollectorId": { + // "description": "ID of the data collector. Overrides any ID in the data collector resource. Must be a string beginning with `dc_` that contains only letters, numbers, and underscores.", // "location": "query", - // "type": "boolean" + // "type": "string" // }, // "parent": { - // "description": "Required. Name of the organization in the following format: `organizations/{org}`", + // "description": "Required. Name of the organization in which to create the data collector in the following format: `organizations/{org}`.", // "location": "path", // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/apis", + // "path": "v1/{+parent}/datacollectors", + // "request": { + // "$ref": "GoogleCloudApigeeV1DataCollector" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ListApiProxiesResponse" + // "$ref": "GoogleCloudApigeeV1DataCollector" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16148,39 +19628,30 @@ func (c *OrganizationsApisListCall) Do(opts ...googleapi.CallOption) (*GoogleClo } -// method id "apigee.organizations.apis.patch": +// method id "apigee.organizations.datacollectors.delete": -type OrganizationsApisPatchCall struct { - s *Service - name string - googlecloudapigeev1apiproxy *GoogleCloudApigeeV1ApiProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDatacollectorsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an existing API proxy. +// Delete: Deletes a data collector. // -// - name: API proxy to update in the following format: -// `organizations/{org}/apis/{api}`. -func (r *OrganizationsApisService) Patch(name string, googlecloudapigeev1apiproxy *GoogleCloudApigeeV1ApiProxy) *OrganizationsApisPatchCall { - c := &OrganizationsApisPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the data collector in the following format: +// `organizations/{org}/datacollectors/{data_collector_id}`. +func (r *OrganizationsDatacollectorsService) Delete(name string) *OrganizationsDatacollectorsDeleteCall { + c := &OrganizationsDatacollectorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1apiproxy = googlecloudapigeev1apiproxy - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The -// list of fields to update. -func (c *OrganizationsApisPatchCall) UpdateMask(updateMask string) *OrganizationsApisPatchCall { - 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 *OrganizationsApisPatchCall) Fields(s ...googleapi.Field) *OrganizationsApisPatchCall { +func (c *OrganizationsDatacollectorsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDatacollectorsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16188,21 +19659,21 @@ func (c *OrganizationsApisPatchCall) Fields(s ...googleapi.Field) *Organizations // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsApisPatchCall) Context(ctx context.Context) *OrganizationsApisPatchCall { +func (c *OrganizationsDatacollectorsDeleteCall) Context(ctx context.Context) *OrganizationsDatacollectorsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisPatchCall) Header() http.Header { +func (c *OrganizationsDatacollectorsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDatacollectorsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -16210,16 +19681,11 @@ func (c *OrganizationsApisPatchCall) doRequest(alt string) (*http.Response, erro } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1apiproxy) - 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -16230,14 +19696,14 @@ func (c *OrganizationsApisPatchCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.patch" call. -// Exactly one of *GoogleCloudApigeeV1ApiProxy or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1ApiProxy.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.datacollectors.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 *OrganizationsApisPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProxy, error) { +func (c *OrganizationsDatacollectorsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16256,7 +19722,7 @@ func (c *OrganizationsApisPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCl if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ApiProxy{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16268,34 +19734,25 @@ func (c *OrganizationsApisPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCl } return ret, nil // { - // "description": "Updates an existing API proxy.", - // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}", - // "httpMethod": "PATCH", - // "id": "apigee.organizations.apis.patch", + // "description": "Deletes a data collector.", + // "flatPath": "v1/organizations/{organizationsId}/datacollectors/{datacollectorsId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.datacollectors.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. API proxy to update in the following format: `organizations/{org}/apis/{api}`", + // "description": "Required. Name of the data collector in the following format: `organizations/{org}/datacollectors/{data_collector_id}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/apis/[^/]+$", + // "pattern": "^organizations/[^/]+/datacollectors/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The list of fields to update.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1ApiProxy" - // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ApiProxy" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16304,32 +19761,31 @@ func (c *OrganizationsApisPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCl } -// method id "apigee.organizations.apis.deployments.list": +// method id "apigee.organizations.datacollectors.get": -type OrganizationsApisDeploymentsListCall struct { +type OrganizationsDatacollectorsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all deployments of an API proxy. +// Get: Gets a data collector. // -// - parent: Name of the API proxy for which to return deployment -// information in the following format: -// `organizations/{org}/apis/{api}`. -func (r *OrganizationsApisDeploymentsService) List(parent string) *OrganizationsApisDeploymentsListCall { - c := &OrganizationsApisDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Name of the data collector in the following format: +// `organizations/{org}/datacollectors/{data_collector_id}`. +func (r *OrganizationsDatacollectorsService) Get(name string) *OrganizationsDatacollectorsGetCall { + c := &OrganizationsDatacollectorsGetCall{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 *OrganizationsApisDeploymentsListCall) Fields(s ...googleapi.Field) *OrganizationsApisDeploymentsListCall { +func (c *OrganizationsDatacollectorsGetCall) Fields(s ...googleapi.Field) *OrganizationsDatacollectorsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16339,7 +19795,7 @@ func (c *OrganizationsApisDeploymentsListCall) Fields(s ...googleapi.Field) *Org // 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 *OrganizationsApisDeploymentsListCall) IfNoneMatch(entityTag string) *OrganizationsApisDeploymentsListCall { +func (c *OrganizationsDatacollectorsGetCall) IfNoneMatch(entityTag string) *OrganizationsDatacollectorsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -16347,21 +19803,21 @@ func (c *OrganizationsApisDeploymentsListCall) IfNoneMatch(entityTag string) *Or // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsApisDeploymentsListCall) Context(ctx context.Context) *OrganizationsApisDeploymentsListCall { +func (c *OrganizationsDatacollectorsGetCall) Context(ctx context.Context) *OrganizationsDatacollectorsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisDeploymentsListCall) Header() http.Header { +func (c *OrganizationsDatacollectorsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisDeploymentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDatacollectorsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -16374,7 +19830,7 @@ func (c *OrganizationsApisDeploymentsListCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -16382,21 +19838,19 @@ func (c *OrganizationsApisDeploymentsListCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.deployments.list" call. -// Exactly one of *GoogleCloudApigeeV1ListDeploymentsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListDeploymentsResponse.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 *OrganizationsApisDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeploymentsResponse, error) { +// Do executes the "apigee.organizations.datacollectors.get" call. +// Exactly one of *GoogleCloudApigeeV1DataCollector or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1DataCollector.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 *OrganizationsDatacollectorsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DataCollector, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16415,7 +19869,7 @@ func (c *OrganizationsApisDeploymentsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListDeploymentsResponse{ + ret := &GoogleCloudApigeeV1DataCollector{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16427,25 +19881,25 @@ func (c *OrganizationsApisDeploymentsListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists all deployments of an API proxy.", - // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/deployments", + // "description": "Gets a data collector.", + // "flatPath": "v1/organizations/{organizationsId}/datacollectors/{datacollectorsId}", // "httpMethod": "GET", - // "id": "apigee.organizations.apis.deployments.list", + // "id": "apigee.organizations.datacollectors.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name of the API proxy for which to return deployment information in the following format: `organizations/{org}/apis/{api}`", + // "name": { + // "description": "Required. Name of the data collector in the following format: `organizations/{org}/datacollectors/{data_collector_id}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/apis/[^/]+$", + // "pattern": "^organizations/[^/]+/datacollectors/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/deployments", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListDeploymentsResponse" + // "$ref": "GoogleCloudApigeeV1DataCollector" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16454,72 +19908,93 @@ func (c *OrganizationsApisDeploymentsListCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.apis.keyvaluemaps.create": +// method id "apigee.organizations.datacollectors.list": -type OrganizationsApisKeyvaluemapsCreateCall struct { - s *Service - parent string - googlecloudapigeev1keyvaluemap *GoogleCloudApigeeV1KeyValueMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDatacollectorsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a key value map in an API proxy. +// List: Lists all data collectors. // -// - parent: Name of the environment in which to create the key value -// map. Use the following structure in your request: -// `organizations/{org}/apis/{api}`. -func (r *OrganizationsApisKeyvaluemapsService) Create(parent string, googlecloudapigeev1keyvaluemap *GoogleCloudApigeeV1KeyValueMap) *OrganizationsApisKeyvaluemapsCreateCall { - c := &OrganizationsApisKeyvaluemapsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the organization for which to list data collectors +// in the following format: `organizations/{org}`. +func (r *OrganizationsDatacollectorsService) List(parent string) *OrganizationsDatacollectorsListCall { + c := &OrganizationsDatacollectorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1keyvaluemap = googlecloudapigeev1keyvaluemap + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// data collectors to return. The page size defaults to 25. +func (c *OrganizationsDatacollectorsListCall) PageSize(pageSize int64) *OrganizationsDatacollectorsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token, +// returned from a previous ListDataCollectors call, that you can use to +// retrieve the next page. +func (c *OrganizationsDatacollectorsListCall) PageToken(pageToken string) *OrganizationsDatacollectorsListCall { + 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 *OrganizationsApisKeyvaluemapsCreateCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsCreateCall { +func (c *OrganizationsDatacollectorsListCall) Fields(s ...googleapi.Field) *OrganizationsDatacollectorsListCall { 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 *OrganizationsDatacollectorsListCall) IfNoneMatch(entityTag string) *OrganizationsDatacollectorsListCall { + 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 *OrganizationsApisKeyvaluemapsCreateCall) Context(ctx context.Context) *OrganizationsApisKeyvaluemapsCreateCall { +func (c *OrganizationsDatacollectorsListCall) Context(ctx context.Context) *OrganizationsDatacollectorsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisKeyvaluemapsCreateCall) Header() http.Header { +func (c *OrganizationsDatacollectorsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisKeyvaluemapsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDatacollectorsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1keyvaluemap) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keyvaluemaps") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datacollectors") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -16530,14 +20005,16 @@ func (c *OrganizationsApisKeyvaluemapsCreateCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.keyvaluemaps.create" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueMap or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueMap.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 *OrganizationsApisKeyvaluemapsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueMap, error) { +// Do executes the "apigee.organizations.datacollectors.list" call. +// Exactly one of *GoogleCloudApigeeV1ListDataCollectorsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListDataCollectorsResponse.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 *OrganizationsDatacollectorsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDataCollectorsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16556,7 +20033,7 @@ func (c *OrganizationsApisKeyvaluemapsCreateCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueMap{ + ret := &GoogleCloudApigeeV1ListDataCollectorsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16568,28 +20045,36 @@ func (c *OrganizationsApisKeyvaluemapsCreateCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Creates a key value map in an API proxy.", - // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps", - // "httpMethod": "POST", - // "id": "apigee.organizations.apis.keyvaluemaps.create", + // "description": "Lists all data collectors.", + // "flatPath": "v1/organizations/{organizationsId}/datacollectors", + // "httpMethod": "GET", + // "id": "apigee.organizations.datacollectors.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "pageSize": { + // "description": "Maximum number of data collectors to return. The page size defaults to 25.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token, returned from a previous ListDataCollectors call, that you can use to retrieve the next page.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. Name of the environment in which to create the key value map. Use the following structure in your request: `organizations/{org}/apis/{api}`", + // "description": "Required. Name of the organization for which to list data collectors in the following format: `organizations/{org}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/apis/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/keyvaluemaps", - // "request": { - // "$ref": "GoogleCloudApigeeV1KeyValueMap" - // }, + // "path": "v1/{+parent}/datacollectors", // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueMap" + // "$ref": "GoogleCloudApigeeV1ListDataCollectorsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16598,31 +20083,60 @@ func (c *OrganizationsApisKeyvaluemapsCreateCall) Do(opts ...googleapi.CallOptio } -// method id "apigee.organizations.apis.keyvaluemaps.delete": +// 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 *OrganizationsDatacollectorsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListDataCollectorsResponse) 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 "apigee.organizations.datacollectors.patch": -type OrganizationsApisKeyvaluemapsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDatacollectorsPatchCall struct { + s *Service + name string + googlecloudapigeev1datacollector *GoogleCloudApigeeV1DataCollector + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a key value map from an API proxy. +// Patch: Updates a data collector. // -// - name: Name of the key value map. Use the following structure in -// your request: -// `organizations/{org}/apis/{api}/keyvaluemaps/{keyvaluemap}`. -func (r *OrganizationsApisKeyvaluemapsService) Delete(name string) *OrganizationsApisKeyvaluemapsDeleteCall { - c := &OrganizationsApisKeyvaluemapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the data collector in the following format: +// `organizations/{org}/datacollectors/{data_collector_id}`. +func (r *OrganizationsDatacollectorsService) Patch(name string, googlecloudapigeev1datacollector *GoogleCloudApigeeV1DataCollector) *OrganizationsDatacollectorsPatchCall { + c := &OrganizationsDatacollectorsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudapigeev1datacollector = googlecloudapigeev1datacollector + return c +} + +// UpdateMask sets the optional parameter "updateMask": List of fields +// to be updated. +func (c *OrganizationsDatacollectorsPatchCall) UpdateMask(updateMask string) *OrganizationsDatacollectorsPatchCall { + 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 *OrganizationsApisKeyvaluemapsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsDeleteCall { +func (c *OrganizationsDatacollectorsPatchCall) Fields(s ...googleapi.Field) *OrganizationsDatacollectorsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16630,21 +20144,21 @@ func (c *OrganizationsApisKeyvaluemapsDeleteCall) Fields(s ...googleapi.Field) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsApisKeyvaluemapsDeleteCall) Context(ctx context.Context) *OrganizationsApisKeyvaluemapsDeleteCall { +func (c *OrganizationsDatacollectorsPatchCall) Context(ctx context.Context) *OrganizationsDatacollectorsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisKeyvaluemapsDeleteCall) Header() http.Header { +func (c *OrganizationsDatacollectorsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisKeyvaluemapsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDatacollectorsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -16652,11 +20166,16 @@ func (c *OrganizationsApisKeyvaluemapsDeleteCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1datacollector) + 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -16667,14 +20186,14 @@ func (c *OrganizationsApisKeyvaluemapsDeleteCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.keyvaluemaps.delete" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueMap or error will be +// Do executes the "apigee.organizations.datacollectors.patch" call. +// Exactly one of *GoogleCloudApigeeV1DataCollector or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueMap.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 +// either *GoogleCloudApigeeV1DataCollector.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 *OrganizationsApisKeyvaluemapsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueMap, error) { +func (c *OrganizationsDatacollectorsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DataCollector, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16693,7 +20212,7 @@ func (c *OrganizationsApisKeyvaluemapsDeleteCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueMap{ + ret := &GoogleCloudApigeeV1DataCollector{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16705,25 +20224,34 @@ func (c *OrganizationsApisKeyvaluemapsDeleteCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Deletes a key value map from an API proxy.", - // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps/{keyvaluemapsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.apis.keyvaluemaps.delete", + // "description": "Updates a data collector.", + // "flatPath": "v1/organizations/{organizationsId}/datacollectors/{datacollectorsId}", + // "httpMethod": "PATCH", + // "id": "apigee.organizations.datacollectors.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the key value map. Use the following structure in your request: `organizations/{org}/apis/{api}/keyvaluemaps/{keyvaluemap}`", + // "description": "Required. Name of the data collector in the following format: `organizations/{org}/datacollectors/{data_collector_id}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+$", + // "pattern": "^organizations/[^/]+/datacollectors/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "List of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1DataCollector" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueMap" + // "$ref": "GoogleCloudApigeeV1DataCollector" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16732,78 +20260,87 @@ func (c *OrganizationsApisKeyvaluemapsDeleteCall) Do(opts ...googleapi.CallOptio } -// method id "apigee.organizations.apis.keyvaluemaps.entries.create": +// method id "apigee.organizations.deployments.list": -type OrganizationsApisKeyvaluemapsEntriesCreateCall struct { - s *Service - parent string - googlecloudapigeev1keyvalueentry *GoogleCloudApigeeV1KeyValueEntry - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDeploymentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates key value entries in a key value map scoped to an -// organization, environment, or API proxy. +// List: Lists all deployments of API proxies or shared flows. // -// - parent: Scope as indicated by the URI in which to create the key -// value map entry. Use **one** of the following structures in your -// request: * -// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}` -// . * -// `organizations/{organization}/environments/{environment}/keyvaluemap -// s/{keyvaluemap}` * -// `organizations/{organization}/keyvaluemaps/{keyvaluemap}`. -func (r *OrganizationsApisKeyvaluemapsEntriesService) Create(parent string, googlecloudapigeev1keyvalueentry *GoogleCloudApigeeV1KeyValueEntry) *OrganizationsApisKeyvaluemapsEntriesCreateCall { - c := &OrganizationsApisKeyvaluemapsEntriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the organization for which to return deployment +// information in the following format: `organizations/{org}`. +func (r *OrganizationsDeploymentsService) List(parent string) *OrganizationsDeploymentsListCall { + c := &OrganizationsDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1keyvalueentry = googlecloudapigeev1keyvalueentry + return c +} + +// SharedFlows sets the optional parameter "sharedFlows": Flag that +// specifies whether to return shared flow or API proxy deployments. Set +// to `true` to return shared flow deployments; set to `false` to return +// API proxy deployments. Defaults to `false`. +func (c *OrganizationsDeploymentsListCall) SharedFlows(sharedFlows bool) *OrganizationsDeploymentsListCall { + c.urlParams_.Set("sharedFlows", fmt.Sprint(sharedFlows)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApisKeyvaluemapsEntriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsEntriesCreateCall { +func (c *OrganizationsDeploymentsListCall) Fields(s ...googleapi.Field) *OrganizationsDeploymentsListCall { 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 *OrganizationsDeploymentsListCall) IfNoneMatch(entityTag string) *OrganizationsDeploymentsListCall { + 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 *OrganizationsApisKeyvaluemapsEntriesCreateCall) Context(ctx context.Context) *OrganizationsApisKeyvaluemapsEntriesCreateCall { +func (c *OrganizationsDeploymentsListCall) Context(ctx context.Context) *OrganizationsDeploymentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisKeyvaluemapsEntriesCreateCall) Header() http.Header { +func (c *OrganizationsDeploymentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisKeyvaluemapsEntriesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDeploymentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1keyvalueentry) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -16814,14 +20351,16 @@ func (c *OrganizationsApisKeyvaluemapsEntriesCreateCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.keyvaluemaps.entries.create" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueEntry.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 *OrganizationsApisKeyvaluemapsEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { +// Do executes the "apigee.organizations.deployments.list" call. +// Exactly one of *GoogleCloudApigeeV1ListDeploymentsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListDeploymentsResponse.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 *OrganizationsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeploymentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16840,7 +20379,7 @@ func (c *OrganizationsApisKeyvaluemapsEntriesCreateCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueEntry{ + ret := &GoogleCloudApigeeV1ListDeploymentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16852,28 +20391,30 @@ func (c *OrganizationsApisKeyvaluemapsEntriesCreateCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Creates key value entries in a key value map scoped to an organization, environment, or API proxy.", - // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps/{keyvaluemapsId}/entries", - // "httpMethod": "POST", - // "id": "apigee.organizations.apis.keyvaluemaps.entries.create", + // "description": "Lists all deployments of API proxies or shared flows.", + // "flatPath": "v1/organizations/{organizationsId}/deployments", + // "httpMethod": "GET", + // "id": "apigee.organizations.deployments.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Scope as indicated by the URI in which to create the key value map entry. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", + // "description": "Required. Name of the organization for which to return deployment information in the following format: `organizations/{org}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" + // }, + // "sharedFlows": { + // "description": "Optional. Flag that specifies whether to return shared flow or API proxy deployments. Set to `true` to return shared flow deployments; set to `false` to return API proxy deployments. Defaults to `false`.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+parent}/entries", - // "request": { - // "$ref": "GoogleCloudApigeeV1KeyValueEntry" - // }, + // "path": "v1/{+parent}/deployments", // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueEntry" + // "$ref": "GoogleCloudApigeeV1ListDeploymentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16882,41 +20423,43 @@ func (c *OrganizationsApisKeyvaluemapsEntriesCreateCall) Do(opts ...googleapi.Ca } -// method id "apigee.organizations.apis.keyvaluemaps.entries.delete": +// method id "apigee.organizations.developers.attributes": -type OrganizationsApisKeyvaluemapsEntriesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAttributesCall struct { + s *Service + parent string + googlecloudapigeev1attributes *GoogleCloudApigeeV1Attributes + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a key value entry from a key value map scoped to an -// organization, environment, or API proxy. **Note:** After you delete -// the key value entry, the policy consuming the entry will continue to -// function with its cached values for a few minutes. This is expected -// behavior. +// Attributes: Updates developer attributes. This API replaces the +// existing attributes with those specified in the request. Add new +// attributes, and include or exclude any existing attributes that you +// want to retain or remove, respectively. The custom attribute limit is +// 18. **Note**: OAuth access tokens and Key Management Service (KMS) +// entities (apps, developers, and API products) are cached for 180 +// seconds (default). Any custom attributes associated with these +// entities are cached for at least 180 seconds after the entity is +// accessed at runtime. Therefore, an `ExpiresIn` element on the OAuthV2 +// policy won't be able to expire an access token in less than 180 +// seconds. // -// - name: Scope as indicated by the URI in which to delete the key -// value map entry. Use **one** of the following structures in your -// request: * -// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/ -// entries/{entry}`. * -// `organizations/{organization}/environments/{environment}/keyvaluemap -// s/{keyvaluemap}/entries/{entry}` * -// `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{en -// try}`. -func (r *OrganizationsApisKeyvaluemapsEntriesService) Delete(name string) *OrganizationsApisKeyvaluemapsEntriesDeleteCall { - c := &OrganizationsApisKeyvaluemapsEntriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Email address of the developer for which attributes are +// being updated. Use the following structure in your request: +// `organizations/{org}/developers/{developer_email}`. +func (r *OrganizationsDevelopersService) Attributes(parent string, googlecloudapigeev1attributes *GoogleCloudApigeeV1Attributes) *OrganizationsDevelopersAttributesCall { + c := &OrganizationsDevelopersAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1attributes = googlecloudapigeev1attributes return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsEntriesDeleteCall { +func (c *OrganizationsDevelopersAttributesCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAttributesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16924,21 +20467,21 @@ func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) Fields(s ...googleapi.F // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) Context(ctx context.Context) *OrganizationsApisKeyvaluemapsEntriesDeleteCall { +func (c *OrganizationsDevelopersAttributesCall) Context(ctx context.Context) *OrganizationsDevelopersAttributesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) Header() http.Header { +func (c *OrganizationsDevelopersAttributesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAttributesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -16946,29 +20489,34 @@ func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) doRequest(alt string) ( } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1attributes) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.keyvaluemaps.entries.delete" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be +// Do executes the "apigee.organizations.developers.attributes" call. +// Exactly one of *GoogleCloudApigeeV1Attributes or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueEntry.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 +// either *GoogleCloudApigeeV1Attributes.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 *OrganizationsApisKeyvaluemapsEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { +func (c *OrganizationsDevelopersAttributesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attributes, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16987,7 +20535,7 @@ func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueEntry{ + ret := &GoogleCloudApigeeV1Attributes{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16999,25 +20547,28 @@ func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Deletes a key value entry from a key value map scoped to an organization, environment, or API proxy. **Note:** After you delete the key value entry, the policy consuming the entry will continue to function with its cached values for a few minutes. This is expected behavior.", - // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.apis.keyvaluemaps.entries.delete", + // "description": "Updates developer attributes. This API replaces the existing attributes with those specified in the request. Add new attributes, and include or exclude any existing attributes that you want to retain or remove, respectively. The custom attribute limit is 18. **Note**: OAuth access tokens and Key Management Service (KMS) entities (apps, developers, and API products) are cached for 180 seconds (default). Any custom attributes associated with these entities are cached for at least 180 seconds after the entity is accessed at runtime. Therefore, an `ExpiresIn` element on the OAuthV2 policy won't be able to expire an access token in less than 180 seconds.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/attributes", + // "httpMethod": "POST", + // "id": "apigee.organizations.developers.attributes", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Scope as indicated by the URI in which to delete the key value map entry. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/entries/{entry}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}/entries/{entry}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{entry}`.", + // "parent": { + // "description": "Required. Email address of the developer for which attributes are being updated. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/attributes", + // "request": { + // "$ref": "GoogleCloudApigeeV1Attributes" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueEntry" + // "$ref": "GoogleCloudApigeeV1Attributes" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17026,104 +20577,93 @@ func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) Do(opts ...googleapi.Ca } -// method id "apigee.organizations.apis.keyvaluemaps.entries.get": +// method id "apigee.organizations.developers.create": -type OrganizationsApisKeyvaluemapsEntriesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersCreateCall struct { + s *Service + parent string + googlecloudapigeev1developer *GoogleCloudApigeeV1Developer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Get the Key value entry value for org, env or apis scoped Key -// value map. +// Create: Creates a developer. Once created, the developer can register +// an app and obtain an API key. At creation time, a developer is set as +// `active`. To change the developer status, use the SetDeveloperStatus +// API. // -// - name: Scope as indicated by the URI in which to fetch the key value -// map entry/value. Use **one** of the following structures in your -// request: * -// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/ -// entries/{entry}`. * -// `organizations/{organization}/environments/{environment}/keyvaluemap -// s/{keyvaluemap}/entries/{entry}` * -// `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{en -// try}`. -func (r *OrganizationsApisKeyvaluemapsEntriesService) Get(name string) *OrganizationsApisKeyvaluemapsEntriesGetCall { - c := &OrganizationsApisKeyvaluemapsEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the Apigee organization in which the developer is +// created. Use the following structure in your request: +// `organizations/{org}`. +func (r *OrganizationsDevelopersService) Create(parent string, googlecloudapigeev1developer *GoogleCloudApigeeV1Developer) *OrganizationsDevelopersCreateCall { + c := &OrganizationsDevelopersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1developer = googlecloudapigeev1developer return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApisKeyvaluemapsEntriesGetCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsEntriesGetCall { +func (c *OrganizationsDevelopersCreateCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersCreateCall { 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 *OrganizationsApisKeyvaluemapsEntriesGetCall) IfNoneMatch(entityTag string) *OrganizationsApisKeyvaluemapsEntriesGetCall { - 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 *OrganizationsApisKeyvaluemapsEntriesGetCall) Context(ctx context.Context) *OrganizationsApisKeyvaluemapsEntriesGetCall { +func (c *OrganizationsDevelopersCreateCall) Context(ctx context.Context) *OrganizationsDevelopersCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisKeyvaluemapsEntriesGetCall) Header() http.Header { +func (c *OrganizationsDevelopersCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisKeyvaluemapsEntriesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developer) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/developers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.keyvaluemaps.entries.get" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be +// Do executes the "apigee.organizations.developers.create" call. +// Exactly one of *GoogleCloudApigeeV1Developer or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueEntry.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 +// either *GoogleCloudApigeeV1Developer.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 *OrganizationsApisKeyvaluemapsEntriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { +func (c *OrganizationsDevelopersCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Developer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17142,7 +20682,7 @@ func (c *OrganizationsApisKeyvaluemapsEntriesGetCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueEntry{ + ret := &GoogleCloudApigeeV1Developer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17154,25 +20694,28 @@ func (c *OrganizationsApisKeyvaluemapsEntriesGetCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Get the Key value entry value for org, env or apis scoped Key value map.", - // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.apis.keyvaluemaps.entries.get", + // "description": "Creates a developer. Once created, the developer can register an app and obtain an API key. At creation time, a developer is set as `active`. To change the developer status, use the SetDeveloperStatus API.", + // "flatPath": "v1/organizations/{organizationsId}/developers", + // "httpMethod": "POST", + // "id": "apigee.organizations.developers.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Scope as indicated by the URI in which to fetch the key value map entry/value. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/entries/{entry}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}/entries/{entry}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{entry}`.", + // "parent": { + // "description": "Required. Name of the Apigee organization in which the developer is created. Use the following structure in your request: `organizations/{org}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/developers", + // "request": { + // "$ref": "GoogleCloudApigeeV1Developer" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueEntry" + // "$ref": "GoogleCloudApigeeV1Developer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17181,120 +20724,90 @@ func (c *OrganizationsApisKeyvaluemapsEntriesGetCall) Do(opts ...googleapi.CallO } -// method id "apigee.organizations.apis.keyvaluemaps.entries.list": +// method id "apigee.organizations.developers.delete": -type OrganizationsApisKeyvaluemapsEntriesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists key value entries for key values maps scoped to an -// organization, environment, or API proxy. +// Delete: Deletes a developer. All apps and API keys associated with +// the developer are also removed. **Warning**: This API will +// permanently delete the developer and related artifacts. To avoid +// permanently deleting developers and their artifacts, set the +// developer status to `inactive` using the SetDeveloperStatus API. +// **Note**: The delete operation is asynchronous. The developer app is +// deleted immediately, but its associated resources, such as apps and +// API keys, may take anywhere from a few seconds to a few minutes to be +// deleted. // -// - parent: Scope as indicated by the URI in which to list key value -// maps. Use **one** of the following structures in your request: * -// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}` -// . * -// `organizations/{organization}/environments/{environment}/keyvaluemap -// s/{keyvaluemap}` * -// `organizations/{organization}/keyvaluemaps/{keyvaluemap}`. -func (r *OrganizationsApisKeyvaluemapsEntriesService) List(parent string) *OrganizationsApisKeyvaluemapsEntriesListCall { - c := &OrganizationsApisKeyvaluemapsEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// key value entries to return. If unspecified, at most 100 entries will -// be returned. -func (c *OrganizationsApisKeyvaluemapsEntriesListCall) PageSize(pageSize int64) *OrganizationsApisKeyvaluemapsEntriesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token. If -// provides, must be a valid key value entry returned from a previous -// call that can be used to retrieve the next page. -func (c *OrganizationsApisKeyvaluemapsEntriesListCall) PageToken(pageToken string) *OrganizationsApisKeyvaluemapsEntriesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Email address of the developer. Use the following structure +// in your request: `organizations/{org}/developers/{developer_email}`. +func (r *OrganizationsDevelopersService) Delete(name string) *OrganizationsDevelopersDeleteCall { + c := &OrganizationsDevelopersDeleteCall{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 *OrganizationsApisKeyvaluemapsEntriesListCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsEntriesListCall { +func (c *OrganizationsDevelopersDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersDeleteCall { 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 *OrganizationsApisKeyvaluemapsEntriesListCall) IfNoneMatch(entityTag string) *OrganizationsApisKeyvaluemapsEntriesListCall { - 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 *OrganizationsApisKeyvaluemapsEntriesListCall) Context(ctx context.Context) *OrganizationsApisKeyvaluemapsEntriesListCall { +func (c *OrganizationsDevelopersDeleteCall) Context(ctx context.Context) *OrganizationsDevelopersDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisKeyvaluemapsEntriesListCall) Header() http.Header { +func (c *OrganizationsDevelopersDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisKeyvaluemapsEntriesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+parent}/entries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.keyvaluemaps.entries.list" call. -// Exactly one of *GoogleCloudApigeeV1ListKeyValueEntriesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListKeyValueEntriesResponse.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 *OrganizationsApisKeyvaluemapsEntriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListKeyValueEntriesResponse, error) { +// Do executes the "apigee.organizations.developers.delete" call. +// Exactly one of *GoogleCloudApigeeV1Developer or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Developer.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 *OrganizationsDevelopersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Developer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17313,7 +20826,7 @@ func (c *OrganizationsApisKeyvaluemapsEntriesListCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListKeyValueEntriesResponse{ + ret := &GoogleCloudApigeeV1Developer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17325,36 +20838,25 @@ func (c *OrganizationsApisKeyvaluemapsEntriesListCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Lists key value entries for key values maps scoped to an organization, environment, or API proxy.", - // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps/{keyvaluemapsId}/entries", - // "httpMethod": "GET", - // "id": "apigee.organizations.apis.keyvaluemaps.entries.list", + // "description": "Deletes a developer. All apps and API keys associated with the developer are also removed. **Warning**: This API will permanently delete the developer and related artifacts. To avoid permanently deleting developers and their artifacts, set the developer status to `inactive` using the SetDeveloperStatus API. **Note**: The delete operation is asynchronous. The developer app is deleted immediately, but its associated resources, such as apps and API keys, may take anywhere from a few seconds to a few minutes to be deleted.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.developers.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Optional. Maximum number of key value entries to return. If unspecified, at most 100 entries will be returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Page token. If provides, must be a valid key value entry returned from a previous call that can be used to retrieve the next page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Scope as indicated by the URI in which to list key value maps. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", + // "name": { + // "description": "Required. Email address of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/entries", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListKeyValueEntriesResponse" + // "$ref": "GoogleCloudApigeeV1Developer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17363,87 +20865,87 @@ func (c *OrganizationsApisKeyvaluemapsEntriesListCall) Do(opts ...googleapi.Call } -// 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 *OrganizationsApisKeyvaluemapsEntriesListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListKeyValueEntriesResponse) 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 "apigee.organizations.apis.revisions.delete": +// method id "apigee.organizations.developers.get": -type OrganizationsApisRevisionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an API proxy revision and all policies, resources, -// endpoints, and revisions associated with it. The API proxy revision -// must be undeployed before you can delete it. +// Get: Returns the developer details, including the developer's name, +// email address, apps, and other information. **Note**: The response +// includes only the first 100 developer apps. // -// - name: API proxy revision in the following format: -// `organizations/{org}/apis/{api}/revisions/{rev}`. -func (r *OrganizationsApisRevisionsService) Delete(name string) *OrganizationsApisRevisionsDeleteCall { - c := &OrganizationsApisRevisionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Email address of the developer. Use the following structure +// in your request: `organizations/{org}/developers/{developer_email}`. +func (r *OrganizationsDevelopersService) Get(name string) *OrganizationsDevelopersGetCall { + c := &OrganizationsDevelopersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Action sets the optional parameter "action": Status of the developer. +// Valid values are `active` or `inactive`. +func (c *OrganizationsDevelopersGetCall) Action(action string) *OrganizationsDevelopersGetCall { + c.urlParams_.Set("action", action) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApisRevisionsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApisRevisionsDeleteCall { +func (c *OrganizationsDevelopersGetCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersGetCall { 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 *OrganizationsDevelopersGetCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersGetCall { + 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 *OrganizationsApisRevisionsDeleteCall) Context(ctx context.Context) *OrganizationsApisRevisionsDeleteCall { +func (c *OrganizationsDevelopersGetCall) Context(ctx context.Context) *OrganizationsDevelopersGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisRevisionsDeleteCall) Header() http.Header { +func (c *OrganizationsDevelopersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisRevisionsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -17454,15 +20956,14 @@ func (c *OrganizationsApisRevisionsDeleteCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.revisions.delete" call. -// Exactly one of *GoogleCloudApigeeV1ApiProxyRevision or error will be +// Do executes the "apigee.organizations.developers.get" call. +// Exactly one of *GoogleCloudApigeeV1Developer or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1ApiProxyRevision.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 *OrganizationsApisRevisionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProxyRevision, error) { +// either *GoogleCloudApigeeV1Developer.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 *OrganizationsDevelopersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Developer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17481,7 +20982,7 @@ func (c *OrganizationsApisRevisionsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ApiProxyRevision{ + ret := &GoogleCloudApigeeV1Developer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17493,25 +20994,30 @@ func (c *OrganizationsApisRevisionsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes an API proxy revision and all policies, resources, endpoints, and revisions associated with it. The API proxy revision must be undeployed before you can delete it.", - // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/revisions/{revisionsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.apis.revisions.delete", + // "description": "Returns the developer details, including the developer's name, email address, apps, and other information. **Note**: The response includes only the first 100 developer apps.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.developers.get", // "parameterOrder": [ // "name" // ], // "parameters": { + // "action": { + // "description": "Status of the developer. Valid values are `active` or `inactive`.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. API proxy revision in the following format: `organizations/{org}/apis/{api}/revisions/{rev}`", + // "description": "Required. Email address of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apis/[^/]+/revisions/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ApiProxyRevision" + // "$ref": "GoogleCloudApigeeV1Developer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17520,9 +21026,9 @@ func (c *OrganizationsApisRevisionsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.apis.revisions.get": +// method id "apigee.organizations.developers.getBalance": -type OrganizationsApisRevisionsGetCall struct { +type OrganizationsDevelopersGetBalanceCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -17531,34 +21037,21 @@ type OrganizationsApisRevisionsGetCall struct { header_ http.Header } -// Get: Gets an API proxy revision. To download the API proxy -// configuration bundle for the specified revision as a zip file, set -// the `format` query parameter to `bundle`. If you are using curl, -// specify `-o filename.zip` to save the output to a file; otherwise, it -// displays to `stdout`. Then, develop the API proxy configuration -// locally and upload the updated API proxy configuration revision, as -// described in updateApiProxyRevision (updateApiProxyRevision). +// GetBalance: Gets the account balance for the developer. // -// - name: API proxy revision in the following format: -// `organizations/{org}/apis/{api}/revisions/{rev}`. -func (r *OrganizationsApisRevisionsService) Get(name string) *OrganizationsApisRevisionsGetCall { - c := &OrganizationsApisRevisionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Account balance for the developer. Use the following +// structure in your request: +// `organizations/{org}/developers/{developer}/balance`. +func (r *OrganizationsDevelopersService) GetBalance(name string) *OrganizationsDevelopersGetBalanceCall { + c := &OrganizationsDevelopersGetBalanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Format sets the optional parameter "format": Format used when -// downloading the API proxy configuration revision. Set to `bundle` to -// download the API proxy configuration revision as a zip file. -func (c *OrganizationsApisRevisionsGetCall) Format(format string) *OrganizationsApisRevisionsGetCall { - c.urlParams_.Set("format", format) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApisRevisionsGetCall) Fields(s ...googleapi.Field) *OrganizationsApisRevisionsGetCall { +func (c *OrganizationsDevelopersGetBalanceCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersGetBalanceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17568,7 +21061,7 @@ func (c *OrganizationsApisRevisionsGetCall) Fields(s ...googleapi.Field) *Organi // 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 *OrganizationsApisRevisionsGetCall) IfNoneMatch(entityTag string) *OrganizationsApisRevisionsGetCall { +func (c *OrganizationsDevelopersGetBalanceCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersGetBalanceCall { c.ifNoneMatch_ = entityTag return c } @@ -17576,21 +21069,21 @@ func (c *OrganizationsApisRevisionsGetCall) IfNoneMatch(entityTag string) *Organ // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsApisRevisionsGetCall) Context(ctx context.Context) *OrganizationsApisRevisionsGetCall { +func (c *OrganizationsDevelopersGetBalanceCall) Context(ctx context.Context) *OrganizationsDevelopersGetBalanceCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisRevisionsGetCall) Header() http.Header { +func (c *OrganizationsDevelopersGetBalanceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisRevisionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersGetBalanceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17616,14 +21109,15 @@ func (c *OrganizationsApisRevisionsGetCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.revisions.get" call. -// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.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 *OrganizationsApisRevisionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// Do executes the "apigee.organizations.developers.getBalance" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperBalance or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1DeveloperBalance.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 *OrganizationsDevelopersGetBalanceCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperBalance, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17642,7 +21136,7 @@ func (c *OrganizationsApisRevisionsGetCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleApiHttpBody{ + ret := &GoogleCloudApigeeV1DeveloperBalance{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17654,30 +21148,25 @@ func (c *OrganizationsApisRevisionsGetCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Gets an API proxy revision. To download the API proxy configuration bundle for the specified revision as a zip file, set the `format` query parameter to `bundle`. If you are using curl, specify `-o filename.zip` to save the output to a file; otherwise, it displays to `stdout`. Then, develop the API proxy configuration locally and upload the updated API proxy configuration revision, as described in [updateApiProxyRevision](updateApiProxyRevision).", - // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/revisions/{revisionsId}", + // "description": "Gets the account balance for the developer.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/balance", // "httpMethod": "GET", - // "id": "apigee.organizations.apis.revisions.get", + // "id": "apigee.organizations.developers.getBalance", // "parameterOrder": [ // "name" // ], // "parameters": { - // "format": { - // "description": "Format used when downloading the API proxy configuration revision. Set to `bundle` to download the API proxy configuration revision as a zip file.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "Required. API proxy revision in the following format: `organizations/{org}/apis/{api}/revisions/{rev}`", + // "description": "Required. Account balance for the developer. Use the following structure in your request: `organizations/{org}/developers/{developer}/balance`", // "location": "path", - // "pattern": "^organizations/[^/]+/apis/[^/]+/revisions/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/balance$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleApiHttpBody" + // "$ref": "GoogleCloudApigeeV1DeveloperBalance" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17686,84 +21175,80 @@ func (c *OrganizationsApisRevisionsGetCall) Do(opts ...googleapi.CallOption) (*G } -// method id "apigee.organizations.apis.revisions.updateApiProxyRevision": +// method id "apigee.organizations.developers.getMonetizationConfig": -type OrganizationsApisRevisionsUpdateApiProxyRevisionCall struct { - s *Service - name string - googleapihttpbody *GoogleApiHttpBody - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersGetMonetizationConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateApiProxyRevision: Updates an existing API proxy revision by -// uploading the API proxy configuration bundle as a zip file from your -// local machine. You can update only API proxy revisions that have -// never been deployed. After deployment, an API proxy revision becomes -// immutable, even if it is undeployed. Set the `Content-Type` header to -// either `multipart/form-data` or `application/octet-stream`. +// GetMonetizationConfig: Gets the monetization configuration for the +// developer. // -// - name: API proxy revision to update in the following format: -// `organizations/{org}/apis/{api}/revisions/{rev}`. -func (r *OrganizationsApisRevisionsService) UpdateApiProxyRevision(name string, googleapihttpbody *GoogleApiHttpBody) *OrganizationsApisRevisionsUpdateApiProxyRevisionCall { - c := &OrganizationsApisRevisionsUpdateApiProxyRevisionCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Monetization configuration for the developer. Use the +// following structure in your request: +// `organizations/{org}/developers/{developer}/monetizationConfig`. +func (r *OrganizationsDevelopersService) GetMonetizationConfig(name string) *OrganizationsDevelopersGetMonetizationConfigCall { + c := &OrganizationsDevelopersGetMonetizationConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleapihttpbody = googleapihttpbody - return c -} - -// Validate sets the optional parameter "validate": Ignored. All uploads -// are validated regardless of the value of this field. Maintained for -// compatibility with Apigee Edge API. -func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Validate(validate bool) *OrganizationsApisRevisionsUpdateApiProxyRevisionCall { - c.urlParams_.Set("validate", fmt.Sprint(validate)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Fields(s ...googleapi.Field) *OrganizationsApisRevisionsUpdateApiProxyRevisionCall { +func (c *OrganizationsDevelopersGetMonetizationConfigCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersGetMonetizationConfigCall { 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 *OrganizationsDevelopersGetMonetizationConfigCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersGetMonetizationConfigCall { + 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 *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Context(ctx context.Context) *OrganizationsApisRevisionsUpdateApiProxyRevisionCall { +func (c *OrganizationsDevelopersGetMonetizationConfigCall) Context(ctx context.Context) *OrganizationsDevelopersGetMonetizationConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Header() http.Header { +func (c *OrganizationsDevelopersGetMonetizationConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersGetMonetizationConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googleapihttpbody) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -17774,15 +21259,16 @@ func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.revisions.updateApiProxyRevision" call. -// Exactly one of *GoogleCloudApigeeV1ApiProxyRevision or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1ApiProxyRevision.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "apigee.organizations.developers.getMonetizationConfig" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperMonetizationConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1DeveloperMonetizationConfig.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 *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProxyRevision, error) { +func (c *OrganizationsDevelopersGetMonetizationConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperMonetizationConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17801,7 +21287,7 @@ func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ApiProxyRevision{ + ret := &GoogleCloudApigeeV1DeveloperMonetizationConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17813,33 +21299,25 @@ func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Do(opts ...google } return ret, nil // { - // "description": "Updates an existing API proxy revision by uploading the API proxy configuration bundle as a zip file from your local machine. You can update only API proxy revisions that have never been deployed. After deployment, an API proxy revision becomes immutable, even if it is undeployed. Set the `Content-Type` header to either `multipart/form-data` or `application/octet-stream`.", - // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/revisions/{revisionsId}", - // "httpMethod": "POST", - // "id": "apigee.organizations.apis.revisions.updateApiProxyRevision", + // "description": "Gets the monetization configuration for the developer.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/monetizationConfig", + // "httpMethod": "GET", + // "id": "apigee.organizations.developers.getMonetizationConfig", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. API proxy revision to update in the following format: `organizations/{org}/apis/{api}/revisions/{rev}`", + // "description": "Required. Monetization configuration for the developer. Use the following structure in your request: `organizations/{org}/developers/{developer}/monetizationConfig`", // "location": "path", - // "pattern": "^organizations/[^/]+/apis/[^/]+/revisions/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/monetizationConfig$", // "required": true, // "type": "string" - // }, - // "validate": { - // "description": "Ignored. All uploads are validated regardless of the value of this field. Maintained for compatibility with Apigee Edge API.", - // "location": "query", - // "type": "boolean" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleApiHttpBody" - // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ApiProxyRevision" + // "$ref": "GoogleCloudApigeeV1DeveloperMonetizationConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17848,9 +21326,9 @@ func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Do(opts ...google } -// method id "apigee.organizations.apis.revisions.deployments.list": +// method id "apigee.organizations.developers.list": -type OrganizationsApisRevisionsDeploymentsListCall struct { +type OrganizationsDevelopersListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -17859,21 +21337,76 @@ type OrganizationsApisRevisionsDeploymentsListCall struct { header_ http.Header } -// List: Lists all deployments of an API proxy revision. +// List: Lists all developers in an organization by email address. By +// default, the response does not include company developers. Set the +// `includeCompany` query parameter to `true` to include company +// developers. **Note**: A maximum of 1000 developers are returned in +// the response. You paginate the list of developers returned using the +// `startKey` and `count` query parameters. // -// - parent: Name of the API proxy revision for which to return -// deployment information in the following format: -// `organizations/{org}/apis/{api}/revisions/{rev}`. -func (r *OrganizationsApisRevisionsDeploymentsService) List(parent string) *OrganizationsApisRevisionsDeploymentsListCall { - c := &OrganizationsApisRevisionsDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the Apigee organization. Use the following +// structure in your request: `organizations/{org}`. +func (r *OrganizationsDevelopersService) List(parent string) *OrganizationsDevelopersListCall { + c := &OrganizationsDevelopersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } +// App sets the optional parameter "app": List only Developers that are +// associated with the app. Note that start_key, count are not +// applicable for this filter criteria. +func (c *OrganizationsDevelopersListCall) App(app string) *OrganizationsDevelopersListCall { + c.urlParams_.Set("app", app) + return c +} + +// Count sets the optional parameter "count": Number of developers to +// return in the API call. Use with the `startKey` parameter to provide +// more targeted filtering. The limit is 1000. +func (c *OrganizationsDevelopersListCall) Count(count int64) *OrganizationsDevelopersListCall { + c.urlParams_.Set("count", fmt.Sprint(count)) + return c +} + +// Expand sets the optional parameter "expand": Specifies whether to +// expand the results. Set to `true` to expand the results. This query +// parameter is not valid if you use the `count` or `startKey` query +// parameters. +func (c *OrganizationsDevelopersListCall) Expand(expand bool) *OrganizationsDevelopersListCall { + c.urlParams_.Set("expand", fmt.Sprint(expand)) + return c +} + +// Ids sets the optional parameter "ids": List of IDs to include, +// separated by commas. +func (c *OrganizationsDevelopersListCall) Ids(ids string) *OrganizationsDevelopersListCall { + c.urlParams_.Set("ids", ids) + return c +} + +// IncludeCompany sets the optional parameter "includeCompany": Flag +// that specifies whether to include company details in the response. +func (c *OrganizationsDevelopersListCall) IncludeCompany(includeCompany bool) *OrganizationsDevelopersListCall { + c.urlParams_.Set("includeCompany", fmt.Sprint(includeCompany)) + return c +} + +// StartKey sets the optional parameter "startKey": **Note**: Must be +// used in conjunction with the `count` parameter. Email address of the +// developer from which to start displaying the list of developers. For +// example, if the an unfiltered list returns: ``` westley@example.com +// fezzik@example.com buttercup@example.com ``` and your `startKey` is +// `fezzik@example.com`, the list returned will be ``` +// fezzik@example.com buttercup@example.com ``` +func (c *OrganizationsDevelopersListCall) StartKey(startKey string) *OrganizationsDevelopersListCall { + c.urlParams_.Set("startKey", startKey) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsApisRevisionsDeploymentsListCall) Fields(s ...googleapi.Field) *OrganizationsApisRevisionsDeploymentsListCall { +func (c *OrganizationsDevelopersListCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17883,7 +21416,7 @@ func (c *OrganizationsApisRevisionsDeploymentsListCall) Fields(s ...googleapi.Fi // 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 *OrganizationsApisRevisionsDeploymentsListCall) IfNoneMatch(entityTag string) *OrganizationsApisRevisionsDeploymentsListCall { +func (c *OrganizationsDevelopersListCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersListCall { c.ifNoneMatch_ = entityTag return c } @@ -17891,21 +21424,21 @@ func (c *OrganizationsApisRevisionsDeploymentsListCall) IfNoneMatch(entityTag st // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsApisRevisionsDeploymentsListCall) Context(ctx context.Context) *OrganizationsApisRevisionsDeploymentsListCall { +func (c *OrganizationsDevelopersListCall) Context(ctx context.Context) *OrganizationsDevelopersListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsApisRevisionsDeploymentsListCall) Header() http.Header { +func (c *OrganizationsDevelopersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsApisRevisionsDeploymentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17918,7 +21451,7 @@ func (c *OrganizationsApisRevisionsDeploymentsListCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/developers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17931,16 +21464,16 @@ func (c *OrganizationsApisRevisionsDeploymentsListCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.revisions.deployments.list" call. -// Exactly one of *GoogleCloudApigeeV1ListDeploymentsResponse or error +// Do executes the "apigee.organizations.developers.list" call. +// Exactly one of *GoogleCloudApigeeV1ListOfDevelopersResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudApigeeV1ListDeploymentsResponse.ServerResponse.Header or +// *GoogleCloudApigeeV1ListOfDevelopersResponse.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 *OrganizationsApisRevisionsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeploymentsResponse, error) { +func (c *OrganizationsDevelopersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListOfDevelopersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17959,7 +21492,7 @@ func (c *OrganizationsApisRevisionsDeploymentsListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListDeploymentsResponse{ + ret := &GoogleCloudApigeeV1ListOfDevelopersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17971,25 +21504,56 @@ func (c *OrganizationsApisRevisionsDeploymentsListCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists all deployments of an API proxy revision.", - // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/revisions/{revisionsId}/deployments", + // "description": "Lists all developers in an organization by email address. By default, the response does not include company developers. Set the `includeCompany` query parameter to `true` to include company developers. **Note**: A maximum of 1000 developers are returned in the response. You paginate the list of developers returned using the `startKey` and `count` query parameters.", + // "flatPath": "v1/organizations/{organizationsId}/developers", // "httpMethod": "GET", - // "id": "apigee.organizations.apis.revisions.deployments.list", + // "id": "apigee.organizations.developers.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "app": { + // "description": "Optional. List only Developers that are associated with the app. Note that start_key, count are not applicable for this filter criteria.", + // "location": "query", + // "type": "string" + // }, + // "count": { + // "description": "Optional. Number of developers to return in the API call. Use with the `startKey` parameter to provide more targeted filtering. The limit is 1000.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "expand": { + // "description": "Specifies whether to expand the results. Set to `true` to expand the results. This query parameter is not valid if you use the `count` or `startKey` query parameters.", + // "location": "query", + // "type": "boolean" + // }, + // "ids": { + // "description": "Optional. List of IDs to include, separated by commas.", + // "location": "query", + // "type": "string" + // }, + // "includeCompany": { + // "description": "Flag that specifies whether to include company details in the response.", + // "location": "query", + // "type": "boolean" + // }, // "parent": { - // "description": "Required. Name of the API proxy revision for which to return deployment information in the following format: `organizations/{org}/apis/{api}/revisions/{rev}`.", + // "description": "Required. Name of the Apigee organization. Use the following structure in your request: `organizations/{org}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/apis/[^/]+/revisions/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" + // }, + // "startKey": { + // "description": "**Note**: Must be used in conjunction with the `count` parameter. Email address of the developer from which to start displaying the list of developers. For example, if the an unfiltered list returns: ``` westley@example.com fezzik@example.com buttercup@example.com ``` and your `startKey` is `fezzik@example.com`, the list returned will be ``` fezzik@example.com buttercup@example.com ```", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/deployments", + // "path": "v1/{+parent}/developers", // "response": { - // "$ref": "GoogleCloudApigeeV1ListDeploymentsResponse" + // "$ref": "GoogleCloudApigeeV1ListOfDevelopersResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17998,78 +21562,80 @@ func (c *OrganizationsApisRevisionsDeploymentsListCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.apps.get": +// method id "apigee.organizations.developers.setDeveloperStatus": -type OrganizationsAppsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersSetDeveloperStatusCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the app profile for the specified app ID. +// SetDeveloperStatus: Sets the status of a developer. A developer is +// `active` by default. If you set a developer's status to `inactive`, +// the API keys assigned to the developer apps are no longer valid even +// though the API keys are set to `approved`. Inactive developers can +// still sign in to the developer portal and create apps; however, any +// new API keys generated during app creation won't work. To set the +// status of a developer, set the `action` query parameter to `active` +// or `inactive`, and the `Content-Type` header to +// `application/octet-stream`. If successful, the API call returns the +// following HTTP status code: `204 No Content` // -// - name: App ID in the following format: -// `organizations/{org}/apps/{app}`. -func (r *OrganizationsAppsService) Get(name string) *OrganizationsAppsGetCall { - c := &OrganizationsAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the developer. Use the following structure in your +// request: `organizations/{org}/developers/{developer_id}`. +func (r *OrganizationsDevelopersService) SetDeveloperStatus(name string) *OrganizationsDevelopersSetDeveloperStatusCall { + c := &OrganizationsDevelopersSetDeveloperStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Action sets the optional parameter "action": Status of the developer. +// Valid values are `active` and `inactive`. +func (c *OrganizationsDevelopersSetDeveloperStatusCall) Action(action string) *OrganizationsDevelopersSetDeveloperStatusCall { + c.urlParams_.Set("action", action) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsAppsGetCall) Fields(s ...googleapi.Field) *OrganizationsAppsGetCall { +func (c *OrganizationsDevelopersSetDeveloperStatusCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersSetDeveloperStatusCall { 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 *OrganizationsAppsGetCall) IfNoneMatch(entityTag string) *OrganizationsAppsGetCall { - 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 *OrganizationsAppsGetCall) Context(ctx context.Context) *OrganizationsAppsGetCall { +func (c *OrganizationsDevelopersSetDeveloperStatusCall) Context(ctx context.Context) *OrganizationsDevelopersSetDeveloperStatusCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsAppsGetCall) Header() http.Header { +func (c *OrganizationsDevelopersSetDeveloperStatusCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsAppsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersSetDeveloperStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -18080,14 +21646,14 @@ func (c *OrganizationsAppsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apps.get" call. -// Exactly one of *GoogleCloudApigeeV1App or error will be non-nil. Any +// Do executes the "apigee.organizations.developers.setDeveloperStatus" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1App.ServerResponse.Header or (if a response was +// *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 *OrganizationsAppsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1App, error) { +func (c *OrganizationsDevelopersSetDeveloperStatusCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18106,7 +21672,7 @@ func (c *OrganizationsAppsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1App{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18118,25 +21684,30 @@ func (c *OrganizationsAppsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou } return ret, nil // { - // "description": "Gets the app profile for the specified app ID.", - // "flatPath": "v1/organizations/{organizationsId}/apps/{appsId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.apps.get", + // "description": "Sets the status of a developer. A developer is `active` by default. If you set a developer's status to `inactive`, the API keys assigned to the developer apps are no longer valid even though the API keys are set to `approved`. Inactive developers can still sign in to the developer portal and create apps; however, any new API keys generated during app creation won't work. To set the status of a developer, set the `action` query parameter to `active` or `inactive`, and the `Content-Type` header to `application/octet-stream`. If successful, the API call returns the following HTTP status code: `204 No Content`", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}", + // "httpMethod": "POST", + // "id": "apigee.organizations.developers.setDeveloperStatus", // "parameterOrder": [ // "name" // ], // "parameters": { + // "action": { + // "description": "Status of the developer. Valid values are `active` and `inactive`.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. App ID in the following format: `organizations/{org}/apps/{app}`", + // "description": "Required. Name of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_id}`", // "location": "path", - // "pattern": "^organizations/[^/]+/apps/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1App" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18145,165 +21716,98 @@ func (c *OrganizationsAppsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou } -// method id "apigee.organizations.apps.list": +// method id "apigee.organizations.developers.update": -type OrganizationsAppsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersUpdateCall struct { + s *Service + name string + googlecloudapigeev1developer *GoogleCloudApigeeV1Developer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists IDs of apps within an organization that have the -// specified app status (approved or revoked) or are of the specified -// app type (developer or company). +// Update: Updates a developer. This API replaces the existing developer +// details with those specified in the request. Include or exclude any +// existing details that you want to retain or delete, respectively. The +// custom attribute limit is 18. **Note**: OAuth access tokens and Key +// Management Service (KMS) entities (apps, developers, and API +// products) are cached for 180 seconds (current default). Any custom +// attributes associated with these entities are cached for at least 180 +// seconds after the entity is accessed at runtime. Therefore, an +// `ExpiresIn` element on the OAuthV2 policy won't be able to expire an +// access token in less than 180 seconds. // -// - parent: Resource path of the parent in the following format: -// `organizations/{org}`. -func (r *OrganizationsAppsService) List(parent string) *OrganizationsAppsListCall { - c := &OrganizationsAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// ApiProduct sets the optional parameter "apiProduct": API product. -func (c *OrganizationsAppsListCall) ApiProduct(apiProduct string) *OrganizationsAppsListCall { - c.urlParams_.Set("apiProduct", apiProduct) - return c -} - -// Apptype sets the optional parameter "apptype": Filter by the type of -// the app. Valid values are `company` or `developer`. Defaults to -// `developer`. -func (c *OrganizationsAppsListCall) Apptype(apptype string) *OrganizationsAppsListCall { - c.urlParams_.Set("apptype", apptype) - return c -} - -// Expand sets the optional parameter "expand": Flag that specifies -// whether to return an expanded list of apps for the organization. -// Defaults to `false`. -func (c *OrganizationsAppsListCall) Expand(expand bool) *OrganizationsAppsListCall { - c.urlParams_.Set("expand", fmt.Sprint(expand)) - return c -} - -// Ids sets the optional parameter "ids": Comma-separated list of app -// IDs on which to filter. -func (c *OrganizationsAppsListCall) Ids(ids string) *OrganizationsAppsListCall { - c.urlParams_.Set("ids", ids) - return c -} - -// IncludeCred sets the optional parameter "includeCred": Flag that -// specifies whether to include credentials in the response. -func (c *OrganizationsAppsListCall) IncludeCred(includeCred bool) *OrganizationsAppsListCall { - c.urlParams_.Set("includeCred", fmt.Sprint(includeCred)) - return c -} - -// KeyStatus sets the optional parameter "keyStatus": Key status of the -// app. Valid values include `approved` or `revoked`. Defaults to -// `approved`. -func (c *OrganizationsAppsListCall) KeyStatus(keyStatus string) *OrganizationsAppsListCall { - c.urlParams_.Set("keyStatus", keyStatus) - return c -} - -// Rows sets the optional parameter "rows": Maximum number of app IDs to -// return. Defaults to 10000. -func (c *OrganizationsAppsListCall) Rows(rows int64) *OrganizationsAppsListCall { - c.urlParams_.Set("rows", fmt.Sprint(rows)) - return c -} - -// StartKey sets the optional parameter "startKey": Returns the list of -// apps starting from the specified app ID. -func (c *OrganizationsAppsListCall) StartKey(startKey string) *OrganizationsAppsListCall { - c.urlParams_.Set("startKey", startKey) - return c -} - -// Status sets the optional parameter "status": Filter by the status of -// the app. Valid values are `approved` or `revoked`. Defaults to -// `approved`. -func (c *OrganizationsAppsListCall) Status(status string) *OrganizationsAppsListCall { - c.urlParams_.Set("status", status) +// - name: Email address of the developer. Use the following structure +// in your request: `organizations/{org}/developers/{developer_email}`. +func (r *OrganizationsDevelopersService) Update(name string, googlecloudapigeev1developer *GoogleCloudApigeeV1Developer) *OrganizationsDevelopersUpdateCall { + c := &OrganizationsDevelopersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1developer = googlecloudapigeev1developer return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsAppsListCall) Fields(s ...googleapi.Field) *OrganizationsAppsListCall { +func (c *OrganizationsDevelopersUpdateCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersUpdateCall { 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 *OrganizationsAppsListCall) IfNoneMatch(entityTag string) *OrganizationsAppsListCall { - 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 *OrganizationsAppsListCall) Context(ctx context.Context) *OrganizationsAppsListCall { +func (c *OrganizationsDevelopersUpdateCall) Context(ctx context.Context) *OrganizationsDevelopersUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsAppsListCall) Header() http.Header { +func (c *OrganizationsDevelopersUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsAppsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developer) + 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, "v1/{+parent}/apps") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apps.list" call. -// Exactly one of *GoogleCloudApigeeV1ListAppsResponse or error will be +// Do executes the "apigee.organizations.developers.update" call. +// Exactly one of *GoogleCloudApigeeV1Developer or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1ListAppsResponse.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 *OrganizationsAppsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListAppsResponse, error) { +// either *GoogleCloudApigeeV1Developer.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 *OrganizationsDevelopersUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Developer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18322,7 +21826,7 @@ func (c *OrganizationsAppsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListAppsResponse{ + ret := &GoogleCloudApigeeV1Developer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18334,71 +21838,28 @@ func (c *OrganizationsAppsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo } return ret, nil // { - // "description": "Lists IDs of apps within an organization that have the specified app status (approved or revoked) or are of the specified app type (developer or company).", - // "flatPath": "v1/organizations/{organizationsId}/apps", - // "httpMethod": "GET", - // "id": "apigee.organizations.apps.list", + // "description": "Updates a developer. This API replaces the existing developer details with those specified in the request. Include or exclude any existing details that you want to retain or delete, respectively. The custom attribute limit is 18. **Note**: OAuth access tokens and Key Management Service (KMS) entities (apps, developers, and API products) are cached for 180 seconds (current default). Any custom attributes associated with these entities are cached for at least 180 seconds after the entity is accessed at runtime. Therefore, an `ExpiresIn` element on the OAuthV2 policy won't be able to expire an access token in less than 180 seconds.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}", + // "httpMethod": "PUT", + // "id": "apigee.organizations.developers.update", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "apiProduct": { - // "description": "API product.", - // "location": "query", - // "type": "string" - // }, - // "apptype": { - // "description": "Optional. Filter by the type of the app. Valid values are `company` or `developer`. Defaults to `developer`.", - // "location": "query", - // "type": "string" - // }, - // "expand": { - // "description": "Optional. Flag that specifies whether to return an expanded list of apps for the organization. Defaults to `false`.", - // "location": "query", - // "type": "boolean" - // }, - // "ids": { - // "description": "Optional. Comma-separated list of app IDs on which to filter.", - // "location": "query", - // "type": "string" - // }, - // "includeCred": { - // "description": "Optional. Flag that specifies whether to include credentials in the response.", - // "location": "query", - // "type": "boolean" - // }, - // "keyStatus": { - // "description": "Optional. Key status of the app. Valid values include `approved` or `revoked`. Defaults to `approved`.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Resource path of the parent in the following format: `organizations/{org}`", + // "name": { + // "description": "Required. Email address of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+$", // "required": true, // "type": "string" - // }, - // "rows": { - // "description": "Optional. Maximum number of app IDs to return. Defaults to 10000.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "startKey": { - // "description": "Returns the list of apps starting from the specified app ID.", - // "location": "query", - // "type": "string" - // }, - // "status": { - // "description": "Optional. Filter by the status of the app. Valid values are `approved` or `revoked`. Defaults to `approved`.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/apps", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1Developer" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ListAppsResponse" + // "$ref": "GoogleCloudApigeeV1Developer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18407,41 +21868,34 @@ func (c *OrganizationsAppsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo } -// method id "apigee.organizations.datacollectors.create": +// method id "apigee.organizations.developers.updateMonetizationConfig": -type OrganizationsDatacollectorsCreateCall struct { - s *Service - parent string - googlecloudapigeev1datacollector *GoogleCloudApigeeV1DataCollector - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersUpdateMonetizationConfigCall struct { + s *Service + name string + googlecloudapigeev1developermonetizationconfig *GoogleCloudApigeeV1DeveloperMonetizationConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new data collector. +// UpdateMonetizationConfig: Updates the monetization configuration for +// the developer. // -// - parent: Name of the organization in which to create the data -// collector in the following format: `organizations/{org}`. -func (r *OrganizationsDatacollectorsService) Create(parent string, googlecloudapigeev1datacollector *GoogleCloudApigeeV1DataCollector) *OrganizationsDatacollectorsCreateCall { - c := &OrganizationsDatacollectorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1datacollector = googlecloudapigeev1datacollector - return c -} - -// DataCollectorId sets the optional parameter "dataCollectorId": ID of -// the data collector. Overrides any ID in the data collector resource. -// Must be a string beginning with `dc_` that contains only letters, -// numbers, and underscores. -func (c *OrganizationsDatacollectorsCreateCall) DataCollectorId(dataCollectorId string) *OrganizationsDatacollectorsCreateCall { - c.urlParams_.Set("dataCollectorId", dataCollectorId) +// - name: Monetization configuration for the developer. Use the +// following structure in your request: +// `organizations/{org}/developers/{developer}/monetizationConfig`. +func (r *OrganizationsDevelopersService) UpdateMonetizationConfig(name string, googlecloudapigeev1developermonetizationconfig *GoogleCloudApigeeV1DeveloperMonetizationConfig) *OrganizationsDevelopersUpdateMonetizationConfigCall { + c := &OrganizationsDevelopersUpdateMonetizationConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1developermonetizationconfig = googlecloudapigeev1developermonetizationconfig return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDatacollectorsCreateCall) Fields(s ...googleapi.Field) *OrganizationsDatacollectorsCreateCall { +func (c *OrganizationsDevelopersUpdateMonetizationConfigCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersUpdateMonetizationConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18449,21 +21903,21 @@ func (c *OrganizationsDatacollectorsCreateCall) Fields(s ...googleapi.Field) *Or // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDatacollectorsCreateCall) Context(ctx context.Context) *OrganizationsDatacollectorsCreateCall { +func (c *OrganizationsDevelopersUpdateMonetizationConfigCall) Context(ctx context.Context) *OrganizationsDevelopersUpdateMonetizationConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDatacollectorsCreateCall) Header() http.Header { +func (c *OrganizationsDevelopersUpdateMonetizationConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDatacollectorsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersUpdateMonetizationConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18471,34 +21925,36 @@ func (c *OrganizationsDatacollectorsCreateCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1datacollector) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developermonetizationconfig) 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, "v1/{+parent}/datacollectors") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.datacollectors.create" call. -// Exactly one of *GoogleCloudApigeeV1DataCollector or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DataCollector.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 *OrganizationsDatacollectorsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DataCollector, error) { +// Do executes the "apigee.organizations.developers.updateMonetizationConfig" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperMonetizationConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1DeveloperMonetizationConfig.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 *OrganizationsDevelopersUpdateMonetizationConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperMonetizationConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18517,7 +21973,7 @@ func (c *OrganizationsDatacollectorsCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DataCollector{ + ret := &GoogleCloudApigeeV1DeveloperMonetizationConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18529,33 +21985,28 @@ func (c *OrganizationsDatacollectorsCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a new data collector.", - // "flatPath": "v1/organizations/{organizationsId}/datacollectors", - // "httpMethod": "POST", - // "id": "apigee.organizations.datacollectors.create", + // "description": "Updates the monetization configuration for the developer.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/monetizationConfig", + // "httpMethod": "PUT", + // "id": "apigee.organizations.developers.updateMonetizationConfig", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "dataCollectorId": { - // "description": "ID of the data collector. Overrides any ID in the data collector resource. Must be a string beginning with `dc_` that contains only letters, numbers, and underscores.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Name of the organization in which to create the data collector in the following format: `organizations/{org}`.", + // "name": { + // "description": "Required. Monetization configuration for the developer. Use the following structure in your request: `organizations/{org}/developers/{developer}/monetizationConfig`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/monetizationConfig$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/datacollectors", + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudApigeeV1DataCollector" + // "$ref": "GoogleCloudApigeeV1DeveloperMonetizationConfig" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1DataCollector" + // "$ref": "GoogleCloudApigeeV1DeveloperMonetizationConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18564,30 +22015,34 @@ func (c *OrganizationsDatacollectorsCreateCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.datacollectors.delete": +// method id "apigee.organizations.developers.apps.attributes": -type OrganizationsDatacollectorsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAppsAttributesCall struct { + s *Service + name string + googlecloudapigeev1attributes *GoogleCloudApigeeV1Attributes + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a data collector. +// Attributes: Updates attributes for a developer app. This API replaces +// the current attributes with those specified in the request. // -// - name: Name of the data collector in the following format: -// `organizations/{org}/datacollectors/{data_collector_id}`. -func (r *OrganizationsDatacollectorsService) Delete(name string) *OrganizationsDatacollectorsDeleteCall { - c := &OrganizationsDatacollectorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the developer app. Use the following structure in +// your request: +// `organizations/{org}/developers/{developer_email}/apps/{app}`. +func (r *OrganizationsDevelopersAppsService) Attributes(name string, googlecloudapigeev1attributes *GoogleCloudApigeeV1Attributes) *OrganizationsDevelopersAppsAttributesCall { + c := &OrganizationsDevelopersAppsAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudapigeev1attributes = googlecloudapigeev1attributes return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDatacollectorsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDatacollectorsDeleteCall { +func (c *OrganizationsDevelopersAppsAttributesCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsAttributesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18595,21 +22050,21 @@ func (c *OrganizationsDatacollectorsDeleteCall) Fields(s ...googleapi.Field) *Or // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDatacollectorsDeleteCall) Context(ctx context.Context) *OrganizationsDatacollectorsDeleteCall { +func (c *OrganizationsDevelopersAppsAttributesCall) Context(ctx context.Context) *OrganizationsDevelopersAppsAttributesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDatacollectorsDeleteCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsAttributesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDatacollectorsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsAttributesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18617,11 +22072,16 @@ func (c *OrganizationsDatacollectorsDeleteCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1attributes) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/attributes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -18632,14 +22092,14 @@ func (c *OrganizationsDatacollectorsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.datacollectors.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 +// Do executes the "apigee.organizations.developers.apps.attributes" call. +// Exactly one of *GoogleCloudApigeeV1Attributes or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Attributes.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 *OrganizationsDatacollectorsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsDevelopersAppsAttributesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attributes, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18658,7 +22118,7 @@ func (c *OrganizationsDatacollectorsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudApigeeV1Attributes{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18670,25 +22130,28 @@ func (c *OrganizationsDatacollectorsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a data collector.", - // "flatPath": "v1/organizations/{organizationsId}/datacollectors/{datacollectorsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.datacollectors.delete", + // "description": "Updates attributes for a developer app. This API replaces the current attributes with those specified in the request.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/attributes", + // "httpMethod": "POST", + // "id": "apigee.organizations.developers.apps.attributes", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the data collector in the following format: `organizations/{org}/datacollectors/{data_collector_id}`.", + // "description": "Required. Name of the developer app. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}`", // "location": "path", - // "pattern": "^organizations/[^/]+/datacollectors/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}/attributes", + // "request": { + // "$ref": "GoogleCloudApigeeV1Attributes" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudApigeeV1Attributes" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18697,96 +22160,95 @@ func (c *OrganizationsDatacollectorsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.datacollectors.get": +// method id "apigee.organizations.developers.apps.create": -type OrganizationsDatacollectorsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAppsCreateCall struct { + s *Service + parent string + googlecloudapigeev1developerapp *GoogleCloudApigeeV1DeveloperApp + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a data collector. +// Create: Creates an app associated with a developer. This API +// associates the developer app with the specified API product and +// auto-generates an API key for the app to use in calls to API proxies +// inside that API product. The `name` is the unique ID of the app that +// you can use in API calls. The `DisplayName` (set as an attribute) +// appears in the UI. If you don't set the `DisplayName` attribute, the +// `name` appears in the UI. // -// - name: Name of the data collector in the following format: -// `organizations/{org}/datacollectors/{data_collector_id}`. -func (r *OrganizationsDatacollectorsService) Get(name string) *OrganizationsDatacollectorsGetCall { - c := &OrganizationsDatacollectorsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the developer. Use the following structure in your +// request: `organizations/{org}/developers/{developer_email}`. +func (r *OrganizationsDevelopersAppsService) Create(parent string, googlecloudapigeev1developerapp *GoogleCloudApigeeV1DeveloperApp) *OrganizationsDevelopersAppsCreateCall { + c := &OrganizationsDevelopersAppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1developerapp = googlecloudapigeev1developerapp return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDatacollectorsGetCall) Fields(s ...googleapi.Field) *OrganizationsDatacollectorsGetCall { +func (c *OrganizationsDevelopersAppsCreateCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsCreateCall { 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 *OrganizationsDatacollectorsGetCall) IfNoneMatch(entityTag string) *OrganizationsDatacollectorsGetCall { - 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 *OrganizationsDatacollectorsGetCall) Context(ctx context.Context) *OrganizationsDatacollectorsGetCall { +func (c *OrganizationsDevelopersAppsCreateCall) Context(ctx context.Context) *OrganizationsDevelopersAppsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDatacollectorsGetCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDatacollectorsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developerapp) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apps") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.datacollectors.get" call. -// Exactly one of *GoogleCloudApigeeV1DataCollector or error will be +// Do executes the "apigee.organizations.developers.apps.create" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperApp or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DataCollector.ServerResponse.Header or (if +// either *GoogleCloudApigeeV1DeveloperApp.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 *OrganizationsDatacollectorsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DataCollector, error) { +func (c *OrganizationsDevelopersAppsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperApp, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18805,7 +22267,7 @@ func (c *OrganizationsDatacollectorsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DataCollector{ + ret := &GoogleCloudApigeeV1DeveloperApp{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18817,25 +22279,28 @@ func (c *OrganizationsDatacollectorsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets a data collector.", - // "flatPath": "v1/organizations/{organizationsId}/datacollectors/{datacollectorsId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.datacollectors.get", + // "description": "Creates an app associated with a developer. This API associates the developer app with the specified API product and auto-generates an API key for the app to use in calls to API proxies inside that API product. The `name` is the unique ID of the app that you can use in API calls. The `DisplayName` (set as an attribute) appears in the UI. If you don't set the `DisplayName` attribute, the `name` appears in the UI.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps", + // "httpMethod": "POST", + // "id": "apigee.organizations.developers.apps.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the data collector in the following format: `organizations/{org}/datacollectors/{data_collector_id}`.", + // "parent": { + // "description": "Required. Name of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", // "location": "path", - // "pattern": "^organizations/[^/]+/datacollectors/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/apps", + // "request": { + // "$ref": "GoogleCloudApigeeV1DeveloperApp" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1DataCollector" + // "$ref": "GoogleCloudApigeeV1DeveloperApp" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18844,113 +22309,86 @@ func (c *OrganizationsDatacollectorsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "apigee.organizations.datacollectors.list": +// method id "apigee.organizations.developers.apps.delete": -type OrganizationsDatacollectorsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAppsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all data collectors. +// Delete: Deletes a developer app. **Note**: The delete operation is +// asynchronous. The developer app is deleted immediately, but its +// associated resources, such as app keys or access tokens, may take +// anywhere from a few seconds to a few minutes to be deleted. // -// - parent: Name of the organization for which to list data collectors -// in the following format: `organizations/{org}`. -func (r *OrganizationsDatacollectorsService) List(parent string) *OrganizationsDatacollectorsListCall { - c := &OrganizationsDatacollectorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// data collectors to return. The page size defaults to 25. -func (c *OrganizationsDatacollectorsListCall) PageSize(pageSize int64) *OrganizationsDatacollectorsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token, -// returned from a previous ListDataCollectors call, that you can use to -// retrieve the next page. -func (c *OrganizationsDatacollectorsListCall) PageToken(pageToken string) *OrganizationsDatacollectorsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Name of the developer app. Use the following structure in +// your request: +// `organizations/{org}/developers/{developer_email}/apps/{app}`. +func (r *OrganizationsDevelopersAppsService) Delete(name string) *OrganizationsDevelopersAppsDeleteCall { + c := &OrganizationsDevelopersAppsDeleteCall{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 *OrganizationsDatacollectorsListCall) Fields(s ...googleapi.Field) *OrganizationsDatacollectorsListCall { +func (c *OrganizationsDevelopersAppsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsDeleteCall { 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 *OrganizationsDatacollectorsListCall) IfNoneMatch(entityTag string) *OrganizationsDatacollectorsListCall { - 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 *OrganizationsDatacollectorsListCall) Context(ctx context.Context) *OrganizationsDatacollectorsListCall { +func (c *OrganizationsDevelopersAppsDeleteCall) Context(ctx context.Context) *OrganizationsDevelopersAppsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDatacollectorsListCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDatacollectorsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+parent}/datacollectors") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.datacollectors.list" call. -// Exactly one of *GoogleCloudApigeeV1ListDataCollectorsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListDataCollectorsResponse.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 *OrganizationsDatacollectorsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDataCollectorsResponse, error) { +// Do executes the "apigee.organizations.developers.apps.delete" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperApp or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1DeveloperApp.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 *OrganizationsDevelopersAppsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperApp, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18969,7 +22407,7 @@ func (c *OrganizationsDatacollectorsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListDataCollectorsResponse{ + ret := &GoogleCloudApigeeV1DeveloperApp{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18981,36 +22419,25 @@ func (c *OrganizationsDatacollectorsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists all data collectors.", - // "flatPath": "v1/organizations/{organizationsId}/datacollectors", - // "httpMethod": "GET", - // "id": "apigee.organizations.datacollectors.list", + // "description": "Deletes a developer app. **Note**: The delete operation is asynchronous. The developer app is deleted immediately, but its associated resources, such as app keys or access tokens, may take anywhere from a few seconds to a few minutes to be deleted.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.developers.apps.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Maximum number of data collectors to return. The page size defaults to 25.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Page token, returned from a previous ListDataCollectors call, that you can use to retrieve the next page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Name of the organization for which to list data collectors in the following format: `organizations/{org}`.", + // "name": { + // "description": "Required. Name of the developer app. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/datacollectors", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListDataCollectorsResponse" + // "$ref": "GoogleCloudApigeeV1DeveloperApp" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19019,60 +22446,65 @@ func (c *OrganizationsDatacollectorsListCall) Do(opts ...googleapi.CallOption) ( } -// 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 *OrganizationsDatacollectorsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListDataCollectorsResponse) 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 "apigee.organizations.datacollectors.patch": +// method id "apigee.organizations.developers.apps.generateKeyPairOrUpdateDeveloperAppStatus": -type OrganizationsDatacollectorsPatchCall struct { - s *Service - name string - googlecloudapigeev1datacollector *GoogleCloudApigeeV1DataCollector - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall struct { + s *Service + name string + googlecloudapigeev1developerapp *GoogleCloudApigeeV1DeveloperApp + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a data collector. +// GenerateKeyPairOrUpdateDeveloperAppStatus: Manages access to a +// developer app by enabling you to: * Approve or revoke a developer app +// * Generate a new consumer key and secret for a developer app To +// approve or revoke a developer app, set the `action` query parameter +// to `approved` or `revoked`, respectively, and the `Content-Type` +// header to `application/octet-stream`. If a developer app is revoked, +// none of its API keys are valid for API calls even though the keys are +// still `approved`. If successful, the API call returns the following +// HTTP status code: `204 No Content` To generate a new consumer key and +// secret for a developer app, pass the new key/secret details. Rather +// than replace an existing key, this API generates a new key. In this +// case, multiple key pairs may be associated with a single developer +// app. Each key pair has an independent status (`approved` or +// `revoked`) and expiration time. Any approved, non-expired key can be +// used in an API call. For example, if you're using API key rotation, +// you can generate new keys with expiration times that overlap keys +// that are going to expire. You might also generate a new consumer +// key/secret if the security of the original key/secret is compromised. +// The `keyExpiresIn` property defines the expiration time for the API +// key in milliseconds. If you don't set this property or set it to +// `-1`, the API key never expires. **Notes**: * When generating a new +// key/secret, this API replaces the existing attributes, notes, and +// callback URLs with those specified in the request. Include or exclude +// any existing information that you want to retain or delete, +// respectively. * To migrate existing consumer keys and secrets to +// hybrid from another system, see the CreateDeveloperAppKey API. // -// - name: Name of the data collector in the following format: -// `organizations/{org}/datacollectors/{data_collector_id}`. -func (r *OrganizationsDatacollectorsService) Patch(name string, googlecloudapigeev1datacollector *GoogleCloudApigeeV1DataCollector) *OrganizationsDatacollectorsPatchCall { - c := &OrganizationsDatacollectorsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the developer app. Use the following structure in +// your request: +// `organizations/{org}/developers/{developer_email}/apps/{app}`. +func (r *OrganizationsDevelopersAppsService) GenerateKeyPairOrUpdateDeveloperAppStatus(name string, googlecloudapigeev1developerapp *GoogleCloudApigeeV1DeveloperApp) *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall { + c := &OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1datacollector = googlecloudapigeev1datacollector + c.googlecloudapigeev1developerapp = googlecloudapigeev1developerapp return c } -// UpdateMask sets the optional parameter "updateMask": List of fields -// to be updated. -func (c *OrganizationsDatacollectorsPatchCall) UpdateMask(updateMask string) *OrganizationsDatacollectorsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Action sets the optional parameter "action": Action. Valid values are +// `approve` or `revoke`. +func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall) Action(action string) *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall { + c.urlParams_.Set("action", action) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDatacollectorsPatchCall) Fields(s ...googleapi.Field) *OrganizationsDatacollectorsPatchCall { +func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19080,21 +22512,21 @@ func (c *OrganizationsDatacollectorsPatchCall) Fields(s ...googleapi.Field) *Org // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDatacollectorsPatchCall) Context(ctx context.Context) *OrganizationsDatacollectorsPatchCall { +func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall) Context(ctx context.Context) *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDatacollectorsPatchCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDatacollectorsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19102,7 +22534,7 @@ func (c *OrganizationsDatacollectorsPatchCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1datacollector) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developerapp) if err != nil { return nil, err } @@ -19111,7 +22543,7 @@ func (c *OrganizationsDatacollectorsPatchCall) doRequest(alt string) (*http.Resp c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -19122,14 +22554,14 @@ func (c *OrganizationsDatacollectorsPatchCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.datacollectors.patch" call. -// Exactly one of *GoogleCloudApigeeV1DataCollector or error will be +// Do executes the "apigee.organizations.developers.apps.generateKeyPairOrUpdateDeveloperAppStatus" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperApp or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DataCollector.ServerResponse.Header or (if +// either *GoogleCloudApigeeV1DeveloperApp.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 *OrganizationsDatacollectorsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DataCollector, error) { +func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperApp, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19148,7 +22580,7 @@ func (c *OrganizationsDatacollectorsPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DataCollector{ + ret := &GoogleCloudApigeeV1DeveloperApp{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19160,34 +22592,33 @@ func (c *OrganizationsDatacollectorsPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates a data collector.", - // "flatPath": "v1/organizations/{organizationsId}/datacollectors/{datacollectorsId}", - // "httpMethod": "PATCH", - // "id": "apigee.organizations.datacollectors.patch", + // "description": "Manages access to a developer app by enabling you to: * Approve or revoke a developer app * Generate a new consumer key and secret for a developer app To approve or revoke a developer app, set the `action` query parameter to `approved` or `revoked`, respectively, and the `Content-Type` header to `application/octet-stream`. If a developer app is revoked, none of its API keys are valid for API calls even though the keys are still `approved`. If successful, the API call returns the following HTTP status code: `204 No Content` To generate a new consumer key and secret for a developer app, pass the new key/secret details. Rather than replace an existing key, this API generates a new key. In this case, multiple key pairs may be associated with a single developer app. Each key pair has an independent status (`approved` or `revoked`) and expiration time. Any approved, non-expired key can be used in an API call. For example, if you're using API key rotation, you can generate new keys with expiration times that overlap keys that are going to expire. You might also generate a new consumer key/secret if the security of the original key/secret is compromised. The `keyExpiresIn` property defines the expiration time for the API key in milliseconds. If you don't set this property or set it to `-1`, the API key never expires. **Notes**: * When generating a new key/secret, this API replaces the existing attributes, notes, and callback URLs with those specified in the request. Include or exclude any existing information that you want to retain or delete, respectively. * To migrate existing consumer keys and secrets to hybrid from another system, see the CreateDeveloperAppKey API.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}", + // "httpMethod": "POST", + // "id": "apigee.organizations.developers.apps.generateKeyPairOrUpdateDeveloperAppStatus", // "parameterOrder": [ // "name" // ], // "parameters": { + // "action": { + // "description": "Action. Valid values are `approve` or `revoke`.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. Name of the data collector in the following format: `organizations/{org}/datacollectors/{data_collector_id}`.", + // "description": "Required. Name of the developer app. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}`", // "location": "path", - // "pattern": "^organizations/[^/]+/datacollectors/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "List of fields to be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudApigeeV1DataCollector" + // "$ref": "GoogleCloudApigeeV1DeveloperApp" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1DataCollector" + // "$ref": "GoogleCloudApigeeV1DeveloperApp" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19196,40 +22627,50 @@ func (c *OrganizationsDatacollectorsPatchCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.deployments.list": +// method id "apigee.organizations.developers.apps.get": -type OrganizationsDeploymentsListCall struct { +type OrganizationsDevelopersAppsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all deployments of API proxies or shared flows. +// Get: Returns the details for a developer app. // -// - parent: Name of the organization for which to return deployment -// information in the following format: `organizations/{org}`. -func (r *OrganizationsDeploymentsService) List(parent string) *OrganizationsDeploymentsListCall { - c := &OrganizationsDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Name of the developer app. Use the following structure in +// your request: +// `organizations/{org}/developers/{developer_email}/apps/{app}`. +func (r *OrganizationsDevelopersAppsService) Get(name string) *OrganizationsDevelopersAppsGetCall { + c := &OrganizationsDevelopersAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// SharedFlows sets the optional parameter "sharedFlows": Flag that -// specifies whether to return shared flow or API proxy deployments. Set -// to `true` to return shared flow deployments; set to `false` to return -// API proxy deployments. Defaults to `false`. -func (c *OrganizationsDeploymentsListCall) SharedFlows(sharedFlows bool) *OrganizationsDeploymentsListCall { - c.urlParams_.Set("sharedFlows", fmt.Sprint(sharedFlows)) +// Entity sets the optional parameter "entity": **Note**: Must be used +// in conjunction with the `query` parameter. Set to `apiresources` to +// return the number of API resources that have been approved for access +// by a developer app in the specified Apigee organization. +func (c *OrganizationsDevelopersAppsGetCall) Entity(entity string) *OrganizationsDevelopersAppsGetCall { + c.urlParams_.Set("entity", entity) + return c +} + +// Query sets the optional parameter "query": **Note**: Must be used in +// conjunction with the `entity` parameter. Set to `count` to return the +// number of API resources that have been approved for access by a +// developer app in the specified Apigee organization. +func (c *OrganizationsDevelopersAppsGetCall) Query(query string) *OrganizationsDevelopersAppsGetCall { + 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 *OrganizationsDeploymentsListCall) Fields(s ...googleapi.Field) *OrganizationsDeploymentsListCall { +func (c *OrganizationsDevelopersAppsGetCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19239,7 +22680,7 @@ func (c *OrganizationsDeploymentsListCall) Fields(s ...googleapi.Field) *Organiz // 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 *OrganizationsDeploymentsListCall) IfNoneMatch(entityTag string) *OrganizationsDeploymentsListCall { +func (c *OrganizationsDevelopersAppsGetCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersAppsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -19247,21 +22688,21 @@ func (c *OrganizationsDeploymentsListCall) IfNoneMatch(entityTag string) *Organi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDeploymentsListCall) Context(ctx context.Context) *OrganizationsDeploymentsListCall { +func (c *OrganizationsDevelopersAppsGetCall) Context(ctx context.Context) *OrganizationsDevelopersAppsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDeploymentsListCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDeploymentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19274,7 +22715,7 @@ func (c *OrganizationsDeploymentsListCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -19282,21 +22723,19 @@ func (c *OrganizationsDeploymentsListCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.deployments.list" call. -// Exactly one of *GoogleCloudApigeeV1ListDeploymentsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListDeploymentsResponse.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 *OrganizationsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeploymentsResponse, error) { +// Do executes the "apigee.organizations.developers.apps.get" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperApp or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1DeveloperApp.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 *OrganizationsDevelopersAppsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperApp, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19315,7 +22754,7 @@ func (c *OrganizationsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListDeploymentsResponse{ + ret := &GoogleCloudApigeeV1DeveloperApp{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19327,30 +22766,35 @@ func (c *OrganizationsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Lists all deployments of API proxies or shared flows.", - // "flatPath": "v1/organizations/{organizationsId}/deployments", + // "description": "Returns the details for a developer app.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}", // "httpMethod": "GET", - // "id": "apigee.organizations.deployments.list", + // "id": "apigee.organizations.developers.apps.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name of the organization for which to return deployment information in the following format: `organizations/{org}`", + // "entity": { + // "description": "**Note**: Must be used in conjunction with the `query` parameter. Set to `apiresources` to return the number of API resources that have been approved for access by a developer app in the specified Apigee organization.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. Name of the developer app. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", // "required": true, // "type": "string" // }, - // "sharedFlows": { - // "description": "Optional. Flag that specifies whether to return shared flow or API proxy deployments. Set to `true` to return shared flow deployments; set to `false` to return API proxy deployments. Defaults to `false`.", + // "query": { + // "description": "**Note**: Must be used in conjunction with the `entity` parameter. Set to `count` to return the number of API resources that have been approved for access by a developer app in the specified Apigee organization.", // "location": "query", - // "type": "boolean" + // "type": "string" // } // }, - // "path": "v1/{+parent}/deployments", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListDeploymentsResponse" + // "$ref": "GoogleCloudApigeeV1DeveloperApp" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19359,82 +22803,119 @@ func (c *OrganizationsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "apigee.organizations.developers.attributes": +// method id "apigee.organizations.developers.apps.list": -type OrganizationsDevelopersAttributesCall struct { - s *Service - parent string - googlecloudapigeev1attributes *GoogleCloudApigeeV1Attributes - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAppsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Attributes: Updates developer attributes. This API replaces the -// existing attributes with those specified in the request. Add new -// attributes, and include or exclude any existing attributes that you -// want to retain or remove, respectively. The custom attribute limit is -// 18. **Note**: OAuth access tokens and Key Management Service (KMS) -// entities (apps, developers, and API products) are cached for 180 -// seconds (default). Any custom attributes associated with these -// entities are cached for at least 180 seconds after the entity is -// accessed at runtime. Therefore, an `ExpiresIn` element on the OAuthV2 -// policy won't be able to expire an access token in less than 180 -// seconds. +// List: Lists all apps created by a developer in an Apigee +// organization. Optionally, you can request an expanded view of the +// developer apps. A maximum of 100 developer apps are returned per API +// call. You can paginate the list of deveoper apps returned using the +// `startKey` and `count` query parameters. // -// - parent: Email address of the developer for which attributes are -// being updated. Use the following structure in your request: -// `organizations/{org}/developers/{developer_email}`. -func (r *OrganizationsDevelopersService) Attributes(parent string, googlecloudapigeev1attributes *GoogleCloudApigeeV1Attributes) *OrganizationsDevelopersAttributesCall { - c := &OrganizationsDevelopersAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the developer. Use the following structure in your +// request: `organizations/{org}/developers/{developer_email}`. +func (r *OrganizationsDevelopersAppsService) List(parent string) *OrganizationsDevelopersAppsListCall { + c := &OrganizationsDevelopersAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1attributes = googlecloudapigeev1attributes + return c +} + +// Count sets the optional parameter "count": Number of developer apps +// to return in the API call. Use with the `startKey` parameter to +// provide more targeted filtering. The limit is 1000. +func (c *OrganizationsDevelopersAppsListCall) Count(count int64) *OrganizationsDevelopersAppsListCall { + c.urlParams_.Set("count", fmt.Sprint(count)) + return c +} + +// Expand sets the optional parameter "expand": Specifies whether to +// expand the results. Set to `true` to expand the results. This query +// parameter is not valid if you use the `count` or `startKey` query +// parameters. +func (c *OrganizationsDevelopersAppsListCall) Expand(expand bool) *OrganizationsDevelopersAppsListCall { + c.urlParams_.Set("expand", fmt.Sprint(expand)) + return c +} + +// ShallowExpand sets the optional parameter "shallowExpand": Specifies +// whether to expand the results in shallow mode. Set to `true` to +// expand the results in shallow mode. +func (c *OrganizationsDevelopersAppsListCall) ShallowExpand(shallowExpand bool) *OrganizationsDevelopersAppsListCall { + c.urlParams_.Set("shallowExpand", fmt.Sprint(shallowExpand)) + return c +} + +// StartKey sets the optional parameter "startKey": **Note**: Must be +// used in conjunction with the `count` parameter. Name of the developer +// app from which to start displaying the list of developer apps. For +// example, if you're returning 50 developer apps at a time (using the +// `count` query parameter), you can view developer apps 50-99 by +// entering the name of the 50th developer app. The developer app name +// is case sensitive. +func (c *OrganizationsDevelopersAppsListCall) StartKey(startKey string) *OrganizationsDevelopersAppsListCall { + c.urlParams_.Set("startKey", startKey) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAttributesCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAttributesCall { +func (c *OrganizationsDevelopersAppsListCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsListCall { 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 *OrganizationsDevelopersAppsListCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersAppsListCall { + 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 *OrganizationsDevelopersAttributesCall) Context(ctx context.Context) *OrganizationsDevelopersAttributesCall { +func (c *OrganizationsDevelopersAppsListCall) Context(ctx context.Context) *OrganizationsDevelopersAppsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAttributesCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAttributesCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1attributes) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apps") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -19445,14 +22926,16 @@ func (c *OrganizationsDevelopersAttributesCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.attributes" call. -// Exactly one of *GoogleCloudApigeeV1Attributes or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Attributes.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 *OrganizationsDevelopersAttributesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attributes, error) { +// Do executes the "apigee.organizations.developers.apps.list" call. +// Exactly one of *GoogleCloudApigeeV1ListDeveloperAppsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListDeveloperAppsResponse.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 *OrganizationsDevelopersAppsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeveloperAppsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19471,7 +22954,7 @@ func (c *OrganizationsDevelopersAttributesCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Attributes{ + ret := &GoogleCloudApigeeV1ListDeveloperAppsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19483,28 +22966,46 @@ func (c *OrganizationsDevelopersAttributesCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates developer attributes. This API replaces the existing attributes with those specified in the request. Add new attributes, and include or exclude any existing attributes that you want to retain or remove, respectively. The custom attribute limit is 18. **Note**: OAuth access tokens and Key Management Service (KMS) entities (apps, developers, and API products) are cached for 180 seconds (default). Any custom attributes associated with these entities are cached for at least 180 seconds after the entity is accessed at runtime. Therefore, an `ExpiresIn` element on the OAuthV2 policy won't be able to expire an access token in less than 180 seconds.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/attributes", - // "httpMethod": "POST", - // "id": "apigee.organizations.developers.attributes", + // "description": "Lists all apps created by a developer in an Apigee organization. Optionally, you can request an expanded view of the developer apps. A maximum of 100 developer apps are returned per API call. You can paginate the list of deveoper apps returned using the `startKey` and `count` query parameters.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps", + // "httpMethod": "GET", + // "id": "apigee.organizations.developers.apps.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "count": { + // "description": "Number of developer apps to return in the API call. Use with the `startKey` parameter to provide more targeted filtering. The limit is 1000.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "expand": { + // "description": "Optional. Specifies whether to expand the results. Set to `true` to expand the results. This query parameter is not valid if you use the `count` or `startKey` query parameters.", + // "location": "query", + // "type": "boolean" + // }, // "parent": { - // "description": "Required. Email address of the developer for which attributes are being updated. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", + // "description": "Required. Name of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", // "location": "path", // "pattern": "^organizations/[^/]+/developers/[^/]+$", // "required": true, // "type": "string" + // }, + // "shallowExpand": { + // "description": "Optional. Specifies whether to expand the results in shallow mode. Set to `true` to expand the results in shallow mode.", + // "location": "query", + // "type": "boolean" + // }, + // "startKey": { + // "description": "**Note**: Must be used in conjunction with the `count` parameter. Name of the developer app from which to start displaying the list of developer apps. For example, if you're returning 50 developer apps at a time (using the `count` query parameter), you can view developer apps 50-99 by entering the name of the 50th developer app. The developer app name is case sensitive.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/attributes", - // "request": { - // "$ref": "GoogleCloudApigeeV1Attributes" - // }, + // "path": "v1/{+parent}/apps", // "response": { - // "$ref": "GoogleCloudApigeeV1Attributes" + // "$ref": "GoogleCloudApigeeV1ListDeveloperAppsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19513,36 +23014,43 @@ func (c *OrganizationsDevelopersAttributesCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.developers.create": +// method id "apigee.organizations.developers.apps.update": -type OrganizationsDevelopersCreateCall struct { - s *Service - parent string - googlecloudapigeev1developer *GoogleCloudApigeeV1Developer - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAppsUpdateCall struct { + s *Service + name string + googlecloudapigeev1developerapp *GoogleCloudApigeeV1DeveloperApp + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a developer. Once created, the developer can register -// an app and obtain an API key. At creation time, a developer is set as -// `active`. To change the developer status, use the SetDeveloperStatus -// API. +// Update: Updates the details for a developer app. In addition, you can +// add an API product to a developer app and automatically generate an +// API key for the app to use when calling APIs in the API product. If +// you want to use an existing API key for the API product, add the API +// product to the API key using the UpdateDeveloperAppKey API. Using +// this API, you cannot update the following: * App name as it is the +// primary key used to identify the app and cannot be changed. * Scopes +// associated with the app. Instead, use the ReplaceDeveloperAppKey API. +// This API replaces the existing attributes with those specified in the +// request. Include or exclude any existing attributes that you want to +// retain or delete, respectively. // -// - parent: Name of the Apigee organization in which the developer is -// created. Use the following structure in your request: -// `organizations/{org}`. -func (r *OrganizationsDevelopersService) Create(parent string, googlecloudapigeev1developer *GoogleCloudApigeeV1Developer) *OrganizationsDevelopersCreateCall { - c := &OrganizationsDevelopersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1developer = googlecloudapigeev1developer +// - name: Name of the developer app. Use the following structure in +// your request: +// `organizations/{org}/developers/{developer_email}/apps/{app}`. +func (r *OrganizationsDevelopersAppsService) Update(name string, googlecloudapigeev1developerapp *GoogleCloudApigeeV1DeveloperApp) *OrganizationsDevelopersAppsUpdateCall { + c := &OrganizationsDevelopersAppsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1developerapp = googlecloudapigeev1developerapp return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersCreateCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersCreateCall { +func (c *OrganizationsDevelopersAppsUpdateCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19550,21 +23058,21 @@ func (c *OrganizationsDevelopersCreateCall) Fields(s ...googleapi.Field) *Organi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersCreateCall) Context(ctx context.Context) *OrganizationsDevelopersCreateCall { +func (c *OrganizationsDevelopersAppsUpdateCall) Context(ctx context.Context) *OrganizationsDevelopersAppsUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersCreateCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19572,34 +23080,34 @@ func (c *OrganizationsDevelopersCreateCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developer) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developerapp) 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, "v1/{+parent}/developers") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.create" call. -// Exactly one of *GoogleCloudApigeeV1Developer or error will be +// Do executes the "apigee.organizations.developers.apps.update" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperApp or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Developer.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 +// either *GoogleCloudApigeeV1DeveloperApp.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 *OrganizationsDevelopersCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Developer, error) { +func (c *OrganizationsDevelopersAppsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperApp, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19618,7 +23126,7 @@ func (c *OrganizationsDevelopersCreateCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Developer{ + ret := &GoogleCloudApigeeV1DeveloperApp{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19630,28 +23138,28 @@ func (c *OrganizationsDevelopersCreateCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Creates a developer. Once created, the developer can register an app and obtain an API key. At creation time, a developer is set as `active`. To change the developer status, use the SetDeveloperStatus API.", - // "flatPath": "v1/organizations/{organizationsId}/developers", - // "httpMethod": "POST", - // "id": "apigee.organizations.developers.create", + // "description": "Updates the details for a developer app. In addition, you can add an API product to a developer app and automatically generate an API key for the app to use when calling APIs in the API product. If you want to use an existing API key for the API product, add the API product to the API key using the UpdateDeveloperAppKey API. Using this API, you cannot update the following: * App name as it is the primary key used to identify the app and cannot be changed. * Scopes associated with the app. Instead, use the ReplaceDeveloperAppKey API. This API replaces the existing attributes with those specified in the request. Include or exclude any existing attributes that you want to retain or delete, respectively.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}", + // "httpMethod": "PUT", + // "id": "apigee.organizations.developers.apps.update", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name of the Apigee organization in which the developer is created. Use the following structure in your request: `organizations/{org}`.", + // "name": { + // "description": "Required. Name of the developer app. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/developers", + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudApigeeV1Developer" + // "$ref": "GoogleCloudApigeeV1DeveloperApp" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Developer" + // "$ref": "GoogleCloudApigeeV1DeveloperApp" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19660,9 +23168,9 @@ func (c *OrganizationsDevelopersCreateCall) Do(opts ...googleapi.CallOption) (*G } -// method id "apigee.organizations.developers.delete": +// method id "apigee.organizations.developers.apps.attributes.delete": -type OrganizationsDevelopersDeleteCall struct { +type OrganizationsDevelopersAppsAttributesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -19670,20 +23178,14 @@ type OrganizationsDevelopersDeleteCall struct { header_ http.Header } -// Delete: Deletes a developer. All apps and API keys associated with -// the developer are also removed. **Warning**: This API will -// permanently delete the developer and related artifacts. To avoid -// permanently deleting developers and their artifacts, set the -// developer status to `inactive` using the SetDeveloperStatus API. -// **Note**: The delete operation is asynchronous. The developer app is -// deleted immediately, but its associated resources, such as apps and -// API keys, may take anywhere from a few seconds to a few minutes to be -// deleted. +// Delete: Deletes a developer app attribute. // -// - name: Email address of the developer. Use the following structure -// in your request: `organizations/{org}/developers/{developer_email}`. -func (r *OrganizationsDevelopersService) Delete(name string) *OrganizationsDevelopersDeleteCall { - c := &OrganizationsDevelopersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the developer app attribute. Use the following +// structure in your request: +// `organizations/{org}/developers/{developer_email}/apps/{app}/attribu +// tes/{attribute}`. +func (r *OrganizationsDevelopersAppsAttributesService) Delete(name string) *OrganizationsDevelopersAppsAttributesDeleteCall { + c := &OrganizationsDevelopersAppsAttributesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -19691,7 +23193,7 @@ func (r *OrganizationsDevelopersService) Delete(name string) *OrganizationsDevel // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersDeleteCall { +func (c *OrganizationsDevelopersAppsAttributesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsAttributesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19699,21 +23201,21 @@ func (c *OrganizationsDevelopersDeleteCall) Fields(s ...googleapi.Field) *Organi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersDeleteCall) Context(ctx context.Context) *OrganizationsDevelopersDeleteCall { +func (c *OrganizationsDevelopersAppsAttributesDeleteCall) Context(ctx context.Context) *OrganizationsDevelopersAppsAttributesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersDeleteCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsAttributesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsAttributesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19736,14 +23238,14 @@ func (c *OrganizationsDevelopersDeleteCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.delete" call. -// Exactly one of *GoogleCloudApigeeV1Developer or error will be +// Do executes the "apigee.organizations.developers.apps.attributes.delete" call. +// Exactly one of *GoogleCloudApigeeV1Attribute or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Developer.ServerResponse.Header or (if a +// either *GoogleCloudApigeeV1Attribute.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 *OrganizationsDevelopersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Developer, error) { +func (c *OrganizationsDevelopersAppsAttributesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19762,7 +23264,7 @@ func (c *OrganizationsDevelopersDeleteCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Developer{ + ret := &GoogleCloudApigeeV1Attribute{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19774,25 +23276,25 @@ func (c *OrganizationsDevelopersDeleteCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Deletes a developer. All apps and API keys associated with the developer are also removed. **Warning**: This API will permanently delete the developer and related artifacts. To avoid permanently deleting developers and their artifacts, set the developer status to `inactive` using the SetDeveloperStatus API. **Note**: The delete operation is asynchronous. The developer app is deleted immediately, but its associated resources, such as apps and API keys, may take anywhere from a few seconds to a few minutes to be deleted.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}", + // "description": "Deletes a developer app attribute.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/attributes/{attributesId}", // "httpMethod": "DELETE", - // "id": "apigee.organizations.developers.delete", + // "id": "apigee.organizations.developers.apps.attributes.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Email address of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", + // "description": "Required. Name of the developer app attribute. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}/attributes/{attribute}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/attributes/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Developer" + // "$ref": "GoogleCloudApigeeV1Attribute" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19801,9 +23303,9 @@ func (c *OrganizationsDevelopersDeleteCall) Do(opts ...googleapi.CallOption) (*G } -// method id "apigee.organizations.developers.get": +// method id "apigee.organizations.developers.apps.attributes.get": -type OrganizationsDevelopersGetCall struct { +type OrganizationsDevelopersAppsAttributesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -19812,29 +23314,22 @@ type OrganizationsDevelopersGetCall struct { header_ http.Header } -// Get: Returns the developer details, including the developer's name, -// email address, apps, and other information. **Note**: The response -// includes only the first 100 developer apps. +// Get: Returns a developer app attribute. // -// - name: Email address of the developer. Use the following structure -// in your request: `organizations/{org}/developers/{developer_email}`. -func (r *OrganizationsDevelopersService) Get(name string) *OrganizationsDevelopersGetCall { - c := &OrganizationsDevelopersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the developer app attribute. Use the following +// structure in your request: +// `organizations/{org}/developers/{developer_email}/apps/{app}/attribu +// tes/{attribute}`. +func (r *OrganizationsDevelopersAppsAttributesService) Get(name string) *OrganizationsDevelopersAppsAttributesGetCall { + c := &OrganizationsDevelopersAppsAttributesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Action sets the optional parameter "action": Status of the developer. -// Valid values are `active` or `inactive`. -func (c *OrganizationsDevelopersGetCall) Action(action string) *OrganizationsDevelopersGetCall { - c.urlParams_.Set("action", action) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersGetCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersGetCall { +func (c *OrganizationsDevelopersAppsAttributesGetCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsAttributesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19844,7 +23339,7 @@ func (c *OrganizationsDevelopersGetCall) Fields(s ...googleapi.Field) *Organizat // 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 *OrganizationsDevelopersGetCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersGetCall { +func (c *OrganizationsDevelopersAppsAttributesGetCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersAppsAttributesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -19852,21 +23347,21 @@ func (c *OrganizationsDevelopersGetCall) IfNoneMatch(entityTag string) *Organiza // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersGetCall) Context(ctx context.Context) *OrganizationsDevelopersGetCall { +func (c *OrganizationsDevelopersAppsAttributesGetCall) Context(ctx context.Context) *OrganizationsDevelopersAppsAttributesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersGetCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsAttributesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsAttributesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19892,14 +23387,14 @@ func (c *OrganizationsDevelopersGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.get" call. -// Exactly one of *GoogleCloudApigeeV1Developer or error will be +// Do executes the "apigee.organizations.developers.apps.attributes.get" call. +// Exactly one of *GoogleCloudApigeeV1Attribute or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Developer.ServerResponse.Header or (if a +// either *GoogleCloudApigeeV1Attribute.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 *OrganizationsDevelopersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Developer, error) { +func (c *OrganizationsDevelopersAppsAttributesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19918,7 +23413,7 @@ func (c *OrganizationsDevelopersGetCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Developer{ + ret := &GoogleCloudApigeeV1Attribute{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19930,30 +23425,25 @@ func (c *OrganizationsDevelopersGetCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Returns the developer details, including the developer's name, email address, apps, and other information. **Note**: The response includes only the first 100 developer apps.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}", + // "description": "Returns a developer app attribute.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/attributes/{attributesId}", // "httpMethod": "GET", - // "id": "apigee.organizations.developers.get", + // "id": "apigee.organizations.developers.apps.attributes.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "action": { - // "description": "Status of the developer. Valid values are `active` or `inactive`.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "Required. Email address of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", + // "description": "Required. Name of the developer app attribute. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}/attributes/{attribute}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/attributes/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Developer" + // "$ref": "GoogleCloudApigeeV1Attribute" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19962,32 +23452,32 @@ func (c *OrganizationsDevelopersGetCall) Do(opts ...googleapi.CallOption) (*Goog } -// method id "apigee.organizations.developers.getBalance": +// method id "apigee.organizations.developers.apps.attributes.list": -type OrganizationsDevelopersGetBalanceCall struct { +type OrganizationsDevelopersAppsAttributesListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetBalance: Gets the account balance for the developer. +// List: Returns a list of all developer app attributes. // -// - name: Account balance for the developer. Use the following -// structure in your request: -// `organizations/{org}/developers/{developer}/balance`. -func (r *OrganizationsDevelopersService) GetBalance(name string) *OrganizationsDevelopersGetBalanceCall { - c := &OrganizationsDevelopersGetBalanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the developer app. Use the following structure in +// your request: +// `organizations/{org}/developers/{developer_email}/apps/{app}`. +func (r *OrganizationsDevelopersAppsAttributesService) List(parent string) *OrganizationsDevelopersAppsAttributesListCall { + c := &OrganizationsDevelopersAppsAttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersGetBalanceCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersGetBalanceCall { +func (c *OrganizationsDevelopersAppsAttributesListCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsAttributesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19997,7 +23487,7 @@ func (c *OrganizationsDevelopersGetBalanceCall) Fields(s ...googleapi.Field) *Or // 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 *OrganizationsDevelopersGetBalanceCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersGetBalanceCall { +func (c *OrganizationsDevelopersAppsAttributesListCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersAppsAttributesListCall { c.ifNoneMatch_ = entityTag return c } @@ -20005,21 +23495,21 @@ func (c *OrganizationsDevelopersGetBalanceCall) IfNoneMatch(entityTag string) *O // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersGetBalanceCall) Context(ctx context.Context) *OrganizationsDevelopersGetBalanceCall { +func (c *OrganizationsDevelopersAppsAttributesListCall) Context(ctx context.Context) *OrganizationsDevelopersAppsAttributesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersGetBalanceCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsAttributesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersGetBalanceCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsAttributesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20032,7 +23522,7 @@ func (c *OrganizationsDevelopersGetBalanceCall) doRequest(alt string) (*http.Res var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20040,20 +23530,19 @@ func (c *OrganizationsDevelopersGetBalanceCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.getBalance" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperBalance or error will be +// Do executes the "apigee.organizations.developers.apps.attributes.list" call. +// Exactly one of *GoogleCloudApigeeV1Attributes or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperBalance.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 *OrganizationsDevelopersGetBalanceCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperBalance, error) { +// either *GoogleCloudApigeeV1Attributes.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 *OrganizationsDevelopersAppsAttributesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attributes, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20072,7 +23561,7 @@ func (c *OrganizationsDevelopersGetBalanceCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperBalance{ + ret := &GoogleCloudApigeeV1Attributes{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20084,25 +23573,25 @@ func (c *OrganizationsDevelopersGetBalanceCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Gets the account balance for the developer.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/balance", + // "description": "Returns a list of all developer app attributes.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/attributes", // "httpMethod": "GET", - // "id": "apigee.organizations.developers.getBalance", + // "id": "apigee.organizations.developers.apps.attributes.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Account balance for the developer. Use the following structure in your request: `organizations/{org}/developers/{developer}/balance`", + // "parent": { + // "description": "Required. Name of the developer app. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/balance$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/attributes", // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperBalance" + // "$ref": "GoogleCloudApigeeV1Attributes" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20111,80 +23600,80 @@ func (c *OrganizationsDevelopersGetBalanceCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.developers.getMonetizationConfig": +// method id "apigee.organizations.developers.apps.attributes.updateDeveloperAppAttribute": -type OrganizationsDevelopersGetMonetizationConfigCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall struct { + s *Service + name string + googlecloudapigeev1attribute *GoogleCloudApigeeV1Attribute + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetMonetizationConfig: Gets the monetization configuration for the -// developer. +// UpdateDeveloperAppAttribute: Updates a developer app attribute. +// **Note**: OAuth access tokens and Key Management Service (KMS) +// entities (apps, developers, and API products) are cached for 180 +// seconds (current default). Any custom attributes associated with +// these entities are cached for at least 180 seconds after the entity +// is accessed at runtime. Therefore, an `ExpiresIn` element on the +// OAuthV2 policy won't be able to expire an access token in less than +// 180 seconds. // -// - name: Monetization configuration for the developer. Use the -// following structure in your request: -// `organizations/{org}/developers/{developer}/monetizationConfig`. -func (r *OrganizationsDevelopersService) GetMonetizationConfig(name string) *OrganizationsDevelopersGetMonetizationConfigCall { - c := &OrganizationsDevelopersGetMonetizationConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the developer app attribute. Use the following +// structure in your request: +// `organizations/{org}/developers/{developer_email}/apps/{app}/attribu +// tes/{attribute}`. +func (r *OrganizationsDevelopersAppsAttributesService) UpdateDeveloperAppAttribute(name string, googlecloudapigeev1attribute *GoogleCloudApigeeV1Attribute) *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall { + c := &OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudapigeev1attribute = googlecloudapigeev1attribute return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersGetMonetizationConfigCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersGetMonetizationConfigCall { +func (c *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall { 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 *OrganizationsDevelopersGetMonetizationConfigCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersGetMonetizationConfigCall { - 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 *OrganizationsDevelopersGetMonetizationConfigCall) Context(ctx context.Context) *OrganizationsDevelopersGetMonetizationConfigCall { +func (c *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) Context(ctx context.Context) *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersGetMonetizationConfigCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersGetMonetizationConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1attribute) + 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -20195,16 +23684,14 @@ func (c *OrganizationsDevelopersGetMonetizationConfigCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.getMonetizationConfig" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperMonetizationConfig or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1DeveloperMonetizationConfig.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 *OrganizationsDevelopersGetMonetizationConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperMonetizationConfig, error) { +// Do executes the "apigee.organizations.developers.apps.attributes.updateDeveloperAppAttribute" call. +// Exactly one of *GoogleCloudApigeeV1Attribute or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Attribute.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 *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20223,7 +23710,7 @@ func (c *OrganizationsDevelopersGetMonetizationConfigCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperMonetizationConfig{ + ret := &GoogleCloudApigeeV1Attribute{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20235,161 +23722,113 @@ func (c *OrganizationsDevelopersGetMonetizationConfigCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Gets the monetization configuration for the developer.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/monetizationConfig", - // "httpMethod": "GET", - // "id": "apigee.organizations.developers.getMonetizationConfig", + // "description": "Updates a developer app attribute. **Note**: OAuth access tokens and Key Management Service (KMS) entities (apps, developers, and API products) are cached for 180 seconds (current default). Any custom attributes associated with these entities are cached for at least 180 seconds after the entity is accessed at runtime. Therefore, an `ExpiresIn` element on the OAuthV2 policy won't be able to expire an access token in less than 180 seconds.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/attributes/{attributesId}", + // "httpMethod": "POST", + // "id": "apigee.organizations.developers.apps.attributes.updateDeveloperAppAttribute", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Monetization configuration for the developer. Use the following structure in your request: `organizations/{org}/developers/{developer}/monetizationConfig`", + // "description": "Required. Name of the developer app attribute. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}/attributes/{attribute}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/monetizationConfig$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/attributes/[^/]+$", // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperMonetizationConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "apigee.organizations.developers.list": - -type OrganizationsDevelopersListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all developers in an organization by email address. By -// default, the response does not include company developers. Set the -// `includeCompany` query parameter to `true` to include company -// developers. **Note**: A maximum of 1000 developers are returned in -// the response. You paginate the list of developers returned using the -// `startKey` and `count` query parameters. -// -// - parent: Name of the Apigee organization. Use the following -// structure in your request: `organizations/{org}`. -func (r *OrganizationsDevelopersService) List(parent string) *OrganizationsDevelopersListCall { - c := &OrganizationsDevelopersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// App sets the optional parameter "app": List only Developers that are -// associated with the app. Note that start_key, count are not -// applicable for this filter criteria. -func (c *OrganizationsDevelopersListCall) App(app string) *OrganizationsDevelopersListCall { - c.urlParams_.Set("app", app) - return c -} - -// Count sets the optional parameter "count": Number of developers to -// return in the API call. Use with the `startKey` parameter to provide -// more targeted filtering. The limit is 1000. -func (c *OrganizationsDevelopersListCall) Count(count int64) *OrganizationsDevelopersListCall { - c.urlParams_.Set("count", fmt.Sprint(count)) - return c -} + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1Attribute" + // }, + // "response": { + // "$ref": "GoogleCloudApigeeV1Attribute" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } -// Expand sets the optional parameter "expand": Specifies whether to -// expand the results. Set to `true` to expand the results. This query -// parameter is not valid if you use the `count` or `startKey` query -// parameters. -func (c *OrganizationsDevelopersListCall) Expand(expand bool) *OrganizationsDevelopersListCall { - c.urlParams_.Set("expand", fmt.Sprint(expand)) - return c } -// Ids sets the optional parameter "ids": List of IDs to include, -// separated by commas. -func (c *OrganizationsDevelopersListCall) Ids(ids string) *OrganizationsDevelopersListCall { - c.urlParams_.Set("ids", ids) - return c -} +// method id "apigee.organizations.developers.apps.keys.create": -// IncludeCompany sets the optional parameter "includeCompany": Flag -// that specifies whether to include company details in the response. -func (c *OrganizationsDevelopersListCall) IncludeCompany(includeCompany bool) *OrganizationsDevelopersListCall { - c.urlParams_.Set("includeCompany", fmt.Sprint(includeCompany)) - return c +type OrganizationsDevelopersAppsKeysCreateCall struct { + s *Service + parent string + googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// StartKey sets the optional parameter "startKey": **Note**: Must be -// used in conjunction with the `count` parameter. Email address of the -// developer from which to start displaying the list of developers. For -// example, if the an unfiltered list returns: ``` westley@example.com -// fezzik@example.com buttercup@example.com ``` and your `startKey` is -// `fezzik@example.com`, the list returned will be ``` -// fezzik@example.com buttercup@example.com ``` -func (c *OrganizationsDevelopersListCall) StartKey(startKey string) *OrganizationsDevelopersListCall { - c.urlParams_.Set("startKey", startKey) +// Create: Creates a custom consumer key and secret for a developer app. +// This is particularly useful if you want to migrate existing consumer +// keys and secrets to Apigee from another system. Consumer keys and +// secrets can contain letters, numbers, underscores, and hyphens. No +// other special characters are allowed. To avoid service disruptions, a +// consumer key and secret should not exceed 2 KBs each. **Note**: When +// creating the consumer key and secret, an association to API products +// will not be made. Therefore, you should not specify the associated +// API products in your request. Instead, use the UpdateDeveloperAppKey +// API to make the association after the consumer key and secret are +// created. If a consumer key and secret already exist, you can keep +// them or delete them using the DeleteDeveloperAppKey API. +// +// - parent: Parent of the developer app key. Use the following +// structure in your request: +// `organizations/{org}/developers/{developer_email}/apps`. +func (r *OrganizationsDevelopersAppsKeysService) Create(parent string, googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey) *OrganizationsDevelopersAppsKeysCreateCall { + c := &OrganizationsDevelopersAppsKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1developerappkey = googlecloudapigeev1developerappkey return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersListCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersListCall { +func (c *OrganizationsDevelopersAppsKeysCreateCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysCreateCall { 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 *OrganizationsDevelopersListCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersListCall { - 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 *OrganizationsDevelopersListCall) Context(ctx context.Context) *OrganizationsDevelopersListCall { +func (c *OrganizationsDevelopersAppsKeysCreateCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersListCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsKeysCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsKeysCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developerappkey) + 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, "v1/{+parent}/developers") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keys") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -20400,16 +23839,15 @@ func (c *OrganizationsDevelopersListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.list" call. -// Exactly one of *GoogleCloudApigeeV1ListOfDevelopersResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListOfDevelopersResponse.ServerResponse.Header or +// Do executes the "apigee.organizations.developers.apps.keys.create" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperAppKey or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1DeveloperAppKey.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 *OrganizationsDevelopersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListOfDevelopersResponse, error) { +func (c *OrganizationsDevelopersAppsKeysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperAppKey, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20428,7 +23866,7 @@ func (c *OrganizationsDevelopersListCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListOfDevelopersResponse{ + ret := &GoogleCloudApigeeV1DeveloperAppKey{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20440,56 +23878,28 @@ func (c *OrganizationsDevelopersListCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Lists all developers in an organization by email address. By default, the response does not include company developers. Set the `includeCompany` query parameter to `true` to include company developers. **Note**: A maximum of 1000 developers are returned in the response. You paginate the list of developers returned using the `startKey` and `count` query parameters.", - // "flatPath": "v1/organizations/{organizationsId}/developers", - // "httpMethod": "GET", - // "id": "apigee.organizations.developers.list", + // "description": "Creates a custom consumer key and secret for a developer app. This is particularly useful if you want to migrate existing consumer keys and secrets to Apigee from another system. Consumer keys and secrets can contain letters, numbers, underscores, and hyphens. No other special characters are allowed. To avoid service disruptions, a consumer key and secret should not exceed 2 KBs each. **Note**: When creating the consumer key and secret, an association to API products will not be made. Therefore, you should not specify the associated API products in your request. Instead, use the UpdateDeveloperAppKey API to make the association after the consumer key and secret are created. If a consumer key and secret already exist, you can keep them or delete them using the DeleteDeveloperAppKey API.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys", + // "httpMethod": "POST", + // "id": "apigee.organizations.developers.apps.keys.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "app": { - // "description": "Optional. List only Developers that are associated with the app. Note that start_key, count are not applicable for this filter criteria.", - // "location": "query", - // "type": "string" - // }, - // "count": { - // "description": "Optional. Number of developers to return in the API call. Use with the `startKey` parameter to provide more targeted filtering. The limit is 1000.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "expand": { - // "description": "Specifies whether to expand the results. Set to `true` to expand the results. This query parameter is not valid if you use the `count` or `startKey` query parameters.", - // "location": "query", - // "type": "boolean" - // }, - // "ids": { - // "description": "Optional. List of IDs to include, separated by commas.", - // "location": "query", - // "type": "string" - // }, - // "includeCompany": { - // "description": "Flag that specifies whether to include company details in the response.", - // "location": "query", - // "type": "boolean" - // }, // "parent": { - // "description": "Required. Name of the Apigee organization. Use the following structure in your request: `organizations/{org}`.", + // "description": "Parent of the developer app key. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", // "required": true, // "type": "string" - // }, - // "startKey": { - // "description": "**Note**: Must be used in conjunction with the `count` parameter. Email address of the developer from which to start displaying the list of developers. For example, if the an unfiltered list returns: ``` westley@example.com fezzik@example.com buttercup@example.com ``` and your `startKey` is `fezzik@example.com`, the list returned will be ``` fezzik@example.com buttercup@example.com ```", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/developers", + // "path": "v1/{+parent}/keys", + // "request": { + // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ListOfDevelopersResponse" + // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20498,9 +23908,9 @@ func (c *OrganizationsDevelopersListCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "apigee.organizations.developers.setDeveloperStatus": +// method id "apigee.organizations.developers.apps.keys.delete": -type OrganizationsDevelopersSetDeveloperStatusCall struct { +type OrganizationsDevelopersAppsKeysDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -20508,36 +23918,28 @@ type OrganizationsDevelopersSetDeveloperStatusCall struct { header_ http.Header } -// SetDeveloperStatus: Sets the status of a developer. A developer is -// `active` by default. If you set a developer's status to `inactive`, -// the API keys assigned to the developer apps are no longer valid even -// though the API keys are set to `approved`. Inactive developers can -// still sign in to the developer portal and create apps; however, any -// new API keys generated during app creation won't work. To set the -// status of a developer, set the `action` query parameter to `active` -// or `inactive`, and the `Content-Type` header to -// `application/octet-stream`. If successful, the API call returns the -// following HTTP status code: `204 No Content` +// Delete: Deletes an app's consumer key and removes all API products +// associated with the app. After the consumer key is deleted, it cannot +// be used to access any APIs. **Note**: After you delete a consumer +// key, you may want to: 1. Create a new consumer key and secret for the +// developer app using the CreateDeveloperAppKey API, and subsequently +// add an API product to the key using the UpdateDeveloperAppKey API. 2. +// Delete the developer app, if it is no longer required. // -// - name: Name of the developer. Use the following structure in your -// request: `organizations/{org}/developers/{developer_id}`. -func (r *OrganizationsDevelopersService) SetDeveloperStatus(name string) *OrganizationsDevelopersSetDeveloperStatusCall { - c := &OrganizationsDevelopersSetDeveloperStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the developer app key. Use the following structure in +// your request: +// `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{k +// ey}`. +func (r *OrganizationsDevelopersAppsKeysService) Delete(name string) *OrganizationsDevelopersAppsKeysDeleteCall { + c := &OrganizationsDevelopersAppsKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Action sets the optional parameter "action": Status of the developer. -// Valid values are `active` and `inactive`. -func (c *OrganizationsDevelopersSetDeveloperStatusCall) Action(action string) *OrganizationsDevelopersSetDeveloperStatusCall { - c.urlParams_.Set("action", action) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersSetDeveloperStatusCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersSetDeveloperStatusCall { +func (c *OrganizationsDevelopersAppsKeysDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20545,21 +23947,21 @@ func (c *OrganizationsDevelopersSetDeveloperStatusCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersSetDeveloperStatusCall) Context(ctx context.Context) *OrganizationsDevelopersSetDeveloperStatusCall { +func (c *OrganizationsDevelopersAppsKeysDeleteCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersSetDeveloperStatusCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsKeysDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersSetDeveloperStatusCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsKeysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20571,7 +23973,7 @@ func (c *OrganizationsDevelopersSetDeveloperStatusCall) doRequest(alt string) (* c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -20582,14 +23984,15 @@ func (c *OrganizationsDevelopersSetDeveloperStatusCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.setDeveloperStatus" 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 *OrganizationsDevelopersSetDeveloperStatusCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "apigee.organizations.developers.apps.keys.delete" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperAppKey or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1DeveloperAppKey.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 *OrganizationsDevelopersAppsKeysDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperAppKey, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20608,7 +24011,7 @@ func (c *OrganizationsDevelopersSetDeveloperStatusCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudApigeeV1DeveloperAppKey{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20620,30 +24023,25 @@ func (c *OrganizationsDevelopersSetDeveloperStatusCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Sets the status of a developer. A developer is `active` by default. If you set a developer's status to `inactive`, the API keys assigned to the developer apps are no longer valid even though the API keys are set to `approved`. Inactive developers can still sign in to the developer portal and create apps; however, any new API keys generated during app creation won't work. To set the status of a developer, set the `action` query parameter to `active` or `inactive`, and the `Content-Type` header to `application/octet-stream`. If successful, the API call returns the following HTTP status code: `204 No Content`", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}", - // "httpMethod": "POST", - // "id": "apigee.organizations.developers.setDeveloperStatus", + // "description": "Deletes an app's consumer key and removes all API products associated with the app. After the consumer key is deleted, it cannot be used to access any APIs. **Note**: After you delete a consumer key, you may want to: 1. Create a new consumer key and secret for the developer app using the CreateDeveloperAppKey API, and subsequently add an API product to the key using the UpdateDeveloperAppKey API. 2. Delete the developer app, if it is no longer required.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys/{keysId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.developers.apps.keys.delete", // "parameterOrder": [ // "name" // ], // "parameters": { - // "action": { - // "description": "Status of the developer. Valid values are `active` and `inactive`.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "Required. Name of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_id}`", + // "description": "Name of the developer app key. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/keys/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20652,80 +24050,82 @@ func (c *OrganizationsDevelopersSetDeveloperStatusCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.developers.update": +// method id "apigee.organizations.developers.apps.keys.get": -type OrganizationsDevelopersUpdateCall struct { - s *Service - name string - googlecloudapigeev1developer *GoogleCloudApigeeV1Developer - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAppsKeysGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates a developer. This API replaces the existing developer -// details with those specified in the request. Include or exclude any -// existing details that you want to retain or delete, respectively. The -// custom attribute limit is 18. **Note**: OAuth access tokens and Key -// Management Service (KMS) entities (apps, developers, and API -// products) are cached for 180 seconds (current default). Any custom -// attributes associated with these entities are cached for at least 180 -// seconds after the entity is accessed at runtime. Therefore, an -// `ExpiresIn` element on the OAuthV2 policy won't be able to expire an -// access token in less than 180 seconds. +// Get: Gets details for a consumer key for a developer app, including +// the key and secret value, associated API products, and other +// information. // -// - name: Email address of the developer. Use the following structure -// in your request: `organizations/{org}/developers/{developer_email}`. -func (r *OrganizationsDevelopersService) Update(name string, googlecloudapigeev1developer *GoogleCloudApigeeV1Developer) *OrganizationsDevelopersUpdateCall { - c := &OrganizationsDevelopersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the developer app key. Use the following structure in +// your request: +// `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{k +// ey}`. +func (r *OrganizationsDevelopersAppsKeysService) Get(name string) *OrganizationsDevelopersAppsKeysGetCall { + c := &OrganizationsDevelopersAppsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1developer = googlecloudapigeev1developer return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersUpdateCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersUpdateCall { +func (c *OrganizationsDevelopersAppsKeysGetCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysGetCall { 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 *OrganizationsDevelopersAppsKeysGetCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersAppsKeysGetCall { + 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 *OrganizationsDevelopersUpdateCall) Context(ctx context.Context) *OrganizationsDevelopersUpdateCall { +func (c *OrganizationsDevelopersAppsKeysGetCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersUpdateCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsKeysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsKeysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1developer) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -20736,14 +24136,15 @@ func (c *OrganizationsDevelopersUpdateCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.update" call. -// Exactly one of *GoogleCloudApigeeV1Developer or error will be +// Do executes the "apigee.organizations.developers.apps.keys.get" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperAppKey or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Developer.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 *OrganizationsDevelopersUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Developer, error) { +// either *GoogleCloudApigeeV1DeveloperAppKey.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 *OrganizationsDevelopersAppsKeysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperAppKey, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20762,7 +24163,7 @@ func (c *OrganizationsDevelopersUpdateCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Developer{ + ret := &GoogleCloudApigeeV1DeveloperAppKey{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20774,28 +24175,25 @@ func (c *OrganizationsDevelopersUpdateCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Updates a developer. This API replaces the existing developer details with those specified in the request. Include or exclude any existing details that you want to retain or delete, respectively. The custom attribute limit is 18. **Note**: OAuth access tokens and Key Management Service (KMS) entities (apps, developers, and API products) are cached for 180 seconds (current default). Any custom attributes associated with these entities are cached for at least 180 seconds after the entity is accessed at runtime. Therefore, an `ExpiresIn` element on the OAuthV2 policy won't be able to expire an access token in less than 180 seconds.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}", - // "httpMethod": "PUT", - // "id": "apigee.organizations.developers.update", + // "description": "Gets details for a consumer key for a developer app, including the key and secret value, associated API products, and other information.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys/{keysId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.developers.apps.keys.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Email address of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", + // "description": "Name of the developer app key. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/keys/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1Developer" - // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Developer" + // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20804,34 +24202,40 @@ func (c *OrganizationsDevelopersUpdateCall) Do(opts ...googleapi.CallOption) (*G } -// method id "apigee.organizations.developers.updateMonetizationConfig": +// method id "apigee.organizations.developers.apps.keys.replaceDeveloperAppKey": -type OrganizationsDevelopersUpdateMonetizationConfigCall struct { - s *Service - name string - googlecloudapigeev1developermonetizationconfig *GoogleCloudApigeeV1DeveloperMonetizationConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall struct { + s *Service + name string + googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateMonetizationConfig: Updates the monetization configuration for -// the developer. +// ReplaceDeveloperAppKey: Updates the scope of an app. This API +// replaces the existing scopes with those specified in the request. +// Include or exclude any existing scopes that you want to retain or +// delete, respectively. The specified scopes must already be defined +// for the API products associated with the app. This API sets the +// `scopes` element under the `apiProducts` element in the attributes of +// the app. // -// - name: Monetization configuration for the developer. Use the -// following structure in your request: -// `organizations/{org}/developers/{developer}/monetizationConfig`. -func (r *OrganizationsDevelopersService) UpdateMonetizationConfig(name string, googlecloudapigeev1developermonetizationconfig *GoogleCloudApigeeV1DeveloperMonetizationConfig) *OrganizationsDevelopersUpdateMonetizationConfigCall { - c := &OrganizationsDevelopersUpdateMonetizationConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the developer app key. Use the following structure in +// your request: +// `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{k +// ey}`. +func (r *OrganizationsDevelopersAppsKeysService) ReplaceDeveloperAppKey(name string, googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey) *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall { + c := &OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1developermonetizationconfig = googlecloudapigeev1developermonetizationconfig + c.googlecloudapigeev1developerappkey = googlecloudapigeev1developerappkey return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersUpdateMonetizationConfigCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersUpdateMonetizationConfigCall { +func (c *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20839,21 +24243,21 @@ func (c *OrganizationsDevelopersUpdateMonetizationConfigCall) Fields(s ...google // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersUpdateMonetizationConfigCall) Context(ctx context.Context) *OrganizationsDevelopersUpdateMonetizationConfigCall { +func (c *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersUpdateMonetizationConfigCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersUpdateMonetizationConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20861,7 +24265,7 @@ func (c *OrganizationsDevelopersUpdateMonetizationConfigCall) doRequest(alt stri } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developermonetizationconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developerappkey) if err != nil { return nil, err } @@ -20881,16 +24285,15 @@ func (c *OrganizationsDevelopersUpdateMonetizationConfigCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.updateMonetizationConfig" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperMonetizationConfig or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1DeveloperMonetizationConfig.ServerResponse.Header -// or (if a response was returned at all) in +// Do executes the "apigee.organizations.developers.apps.keys.replaceDeveloperAppKey" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperAppKey or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1DeveloperAppKey.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 *OrganizationsDevelopersUpdateMonetizationConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperMonetizationConfig, error) { +func (c *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperAppKey, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20909,7 +24312,7 @@ func (c *OrganizationsDevelopersUpdateMonetizationConfigCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperMonetizationConfig{ + ret := &GoogleCloudApigeeV1DeveloperAppKey{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20921,28 +24324,28 @@ func (c *OrganizationsDevelopersUpdateMonetizationConfigCall) Do(opts ...googlea } return ret, nil // { - // "description": "Updates the monetization configuration for the developer.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/monetizationConfig", + // "description": "Updates the scope of an app. This API replaces the existing scopes with those specified in the request. Include or exclude any existing scopes that you want to retain or delete, respectively. The specified scopes must already be defined for the API products associated with the app. This API sets the `scopes` element under the `apiProducts` element in the attributes of the app.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys/{keysId}", // "httpMethod": "PUT", - // "id": "apigee.organizations.developers.updateMonetizationConfig", + // "id": "apigee.organizations.developers.apps.keys.replaceDeveloperAppKey", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Monetization configuration for the developer. Use the following structure in your request: `organizations/{org}/developers/{developer}/monetizationConfig`", + // "description": "Name of the developer app key. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/monetizationConfig$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/keys/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudApigeeV1DeveloperMonetizationConfig" + // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperMonetizationConfig" + // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20951,34 +24354,49 @@ func (c *OrganizationsDevelopersUpdateMonetizationConfigCall) Do(opts ...googlea } -// method id "apigee.organizations.developers.apps.attributes": +// method id "apigee.organizations.developers.apps.keys.updateDeveloperAppKey": -type OrganizationsDevelopersAppsAttributesCall struct { - s *Service - name string - googlecloudapigeev1attributes *GoogleCloudApigeeV1Attributes - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall struct { + s *Service + name string + googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Attributes: Updates attributes for a developer app. This API replaces -// the current attributes with those specified in the request. +// UpdateDeveloperAppKey: Adds an API product to a developer app key, +// enabling the app that holds the key to access the API resources +// bundled in the API product. In addition, you can add attributes to a +// developer app key. This API replaces the existing attributes with +// those specified in the request. Include or exclude any existing +// attributes that you want to retain or delete, respectively. You can +// use the same key to access all API products associated with the app. // -// - name: Name of the developer app. Use the following structure in +// - name: Name of the developer app key. Use the following structure in // your request: -// `organizations/{org}/developers/{developer_email}/apps/{app}`. -func (r *OrganizationsDevelopersAppsService) Attributes(name string, googlecloudapigeev1attributes *GoogleCloudApigeeV1Attributes) *OrganizationsDevelopersAppsAttributesCall { - c := &OrganizationsDevelopersAppsAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{k +// ey}`. +func (r *OrganizationsDevelopersAppsKeysService) UpdateDeveloperAppKey(name string, googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey) *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall { + c := &OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1attributes = googlecloudapigeev1attributes + c.googlecloudapigeev1developerappkey = googlecloudapigeev1developerappkey + return c +} + +// Action sets the optional parameter "action": Approve or revoke the +// consumer key by setting this value to `approve` or `revoke`, +// respectively. The `Content-Type` header must be set to +// `application/octet-stream`. +func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Action(action string) *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall { + c.urlParams_.Set("action", action) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAppsAttributesCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsAttributesCall { +func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20986,21 +24404,21 @@ func (c *OrganizationsDevelopersAppsAttributesCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAppsAttributesCall) Context(ctx context.Context) *OrganizationsDevelopersAppsAttributesCall { +func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsAttributesCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsAttributesCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21008,14 +24426,14 @@ func (c *OrganizationsDevelopersAppsAttributesCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1attributes) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developerappkey) 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, "v1/{+name}/attributes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -21028,14 +24446,15 @@ func (c *OrganizationsDevelopersAppsAttributesCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.attributes" call. -// Exactly one of *GoogleCloudApigeeV1Attributes or error will be +// Do executes the "apigee.organizations.developers.apps.keys.updateDeveloperAppKey" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperAppKey or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Attributes.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 *OrganizationsDevelopersAppsAttributesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attributes, error) { +// either *GoogleCloudApigeeV1DeveloperAppKey.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 *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperAppKey, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21054,7 +24473,7 @@ func (c *OrganizationsDevelopersAppsAttributesCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Attributes{ + ret := &GoogleCloudApigeeV1DeveloperAppKey{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21066,28 +24485,33 @@ func (c *OrganizationsDevelopersAppsAttributesCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Updates attributes for a developer app. This API replaces the current attributes with those specified in the request.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/attributes", + // "description": "Adds an API product to a developer app key, enabling the app that holds the key to access the API resources bundled in the API product. In addition, you can add attributes to a developer app key. This API replaces the existing attributes with those specified in the request. Include or exclude any existing attributes that you want to retain or delete, respectively. You can use the same key to access all API products associated with the app.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys/{keysId}", // "httpMethod": "POST", - // "id": "apigee.organizations.developers.apps.attributes", + // "id": "apigee.organizations.developers.apps.keys.updateDeveloperAppKey", // "parameterOrder": [ // "name" // ], // "parameters": { + // "action": { + // "description": "Approve or revoke the consumer key by setting this value to `approve` or `revoke`, respectively. The `Content-Type` header must be set to `application/octet-stream`.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. Name of the developer app. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}`", + // "description": "Name of the developer app key. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/keys/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}/attributes", + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudApigeeV1Attributes" + // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Attributes" + // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21096,38 +24520,35 @@ func (c *OrganizationsDevelopersAppsAttributesCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.developers.apps.create": +// method id "apigee.organizations.developers.apps.keys.apiproducts.delete": -type OrganizationsDevelopersAppsCreateCall struct { - s *Service - parent string - googlecloudapigeev1developerapp *GoogleCloudApigeeV1DeveloperApp - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAppsKeysApiproductsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an app associated with a developer. This API -// associates the developer app with the specified API product and -// auto-generates an API key for the app to use in calls to API proxies -// inside that API product. The `name` is the unique ID of the app that -// you can use in API calls. The `DisplayName` (set as an attribute) -// appears in the UI. If you don't set the `DisplayName` attribute, the -// `name` appears in the UI. +// Delete: Removes an API product from an app's consumer key. After the +// API product is removed, the app cannot access the API resources +// defined in that API product. **Note**: The consumer key is not +// removed, only its association with the API product. // -// - parent: Name of the developer. Use the following structure in your -// request: `organizations/{org}/developers/{developer_email}`. -func (r *OrganizationsDevelopersAppsService) Create(parent string, googlecloudapigeev1developerapp *GoogleCloudApigeeV1DeveloperApp) *OrganizationsDevelopersAppsCreateCall { - c := &OrganizationsDevelopersAppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1developerapp = googlecloudapigeev1developerapp +// - name: Name of the API product in the developer app key in the +// following format: +// `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{k +// ey}/apiproducts/{apiproduct}`. +func (r *OrganizationsDevelopersAppsKeysApiproductsService) Delete(name string) *OrganizationsDevelopersAppsKeysApiproductsDeleteCall { + c := &OrganizationsDevelopersAppsKeysApiproductsDeleteCall{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 *OrganizationsDevelopersAppsCreateCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsCreateCall { +func (c *OrganizationsDevelopersAppsKeysApiproductsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysApiproductsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21135,21 +24556,21 @@ func (c *OrganizationsDevelopersAppsCreateCall) Fields(s ...googleapi.Field) *Or // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAppsCreateCall) Context(ctx context.Context) *OrganizationsDevelopersAppsCreateCall { +func (c *OrganizationsDevelopersAppsKeysApiproductsDeleteCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysApiproductsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsCreateCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsKeysApiproductsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsKeysApiproductsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21157,34 +24578,30 @@ func (c *OrganizationsDevelopersAppsCreateCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developerapp) - 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, "v1/{+parent}/apps") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.create" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperApp or error will be +// Do executes the "apigee.organizations.developers.apps.keys.apiproducts.delete" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperAppKey or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperApp.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 *OrganizationsDevelopersAppsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperApp, error) { +// either *GoogleCloudApigeeV1DeveloperAppKey.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 *OrganizationsDevelopersAppsKeysApiproductsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperAppKey, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21203,7 +24620,7 @@ func (c *OrganizationsDevelopersAppsCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperApp{ + ret := &GoogleCloudApigeeV1DeveloperAppKey{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21215,28 +24632,25 @@ func (c *OrganizationsDevelopersAppsCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates an app associated with a developer. This API associates the developer app with the specified API product and auto-generates an API key for the app to use in calls to API proxies inside that API product. The `name` is the unique ID of the app that you can use in API calls. The `DisplayName` (set as an attribute) appears in the UI. If you don't set the `DisplayName` attribute, the `name` appears in the UI.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps", - // "httpMethod": "POST", - // "id": "apigee.organizations.developers.apps.create", + // "description": "Removes an API product from an app's consumer key. After the API product is removed, the app cannot access the API resources defined in that API product. **Note**: The consumer key is not removed, only its association with the API product.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys/{keysId}/apiproducts/{apiproductsId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.developers.apps.keys.apiproducts.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", + // "name": { + // "description": "Name of the API product in the developer app key in the following format: `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}/apiproducts/{apiproduct}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/keys/[^/]+/apiproducts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/apps", - // "request": { - // "$ref": "GoogleCloudApigeeV1DeveloperApp" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperApp" + // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21245,9 +24659,9 @@ func (c *OrganizationsDevelopersAppsCreateCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.developers.apps.delete": +// method id "apigee.organizations.developers.apps.keys.apiproducts.updateDeveloperAppKeyApiProduct": -type OrganizationsDevelopersAppsDeleteCall struct { +type OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21255,24 +24669,36 @@ type OrganizationsDevelopersAppsDeleteCall struct { header_ http.Header } -// Delete: Deletes a developer app. **Note**: The delete operation is -// asynchronous. The developer app is deleted immediately, but its -// associated resources, such as app keys or access tokens, may take -// anywhere from a few seconds to a few minutes to be deleted. +// UpdateDeveloperAppKeyApiProduct: Approves or revokes the consumer key +// for an API product. After a consumer key is approved, the app can use +// it to access APIs. A consumer key that is revoked or pending cannot +// be used to access an API. Any access tokens associated with a revoked +// consumer key will remain active. However, Apigee checks the status of +// the consumer key and if set to `revoked` will not allow access to the +// API. // -// - name: Name of the developer app. Use the following structure in -// your request: -// `organizations/{org}/developers/{developer_email}/apps/{app}`. -func (r *OrganizationsDevelopersAppsService) Delete(name string) *OrganizationsDevelopersAppsDeleteCall { - c := &OrganizationsDevelopersAppsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the API product in the developer app key in the +// following format: +// `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{k +// ey}/apiproducts/{apiproduct}`. +func (r *OrganizationsDevelopersAppsKeysApiproductsService) UpdateDeveloperAppKeyApiProduct(name string) *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall { + c := &OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Action sets the optional parameter "action": Approve or revoke the +// consumer key by setting this value to `approve` or `revoke`, +// respectively. +func (c *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall) Action(action string) *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall { + c.urlParams_.Set("action", action) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAppsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsDeleteCall { +func (c *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21280,21 +24706,21 @@ func (c *OrganizationsDevelopersAppsDeleteCall) Fields(s ...googleapi.Field) *Or // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAppsDeleteCall) Context(ctx context.Context) *OrganizationsDevelopersAppsDeleteCall { +func (c *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsDeleteCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21306,7 +24732,7 @@ func (c *OrganizationsDevelopersAppsDeleteCall) doRequest(alt string) (*http.Res c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -21317,14 +24743,14 @@ func (c *OrganizationsDevelopersAppsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.delete" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperApp or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperApp.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 +// Do executes the "apigee.organizations.developers.apps.keys.apiproducts.updateDeveloperAppKeyApiProduct" 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 *OrganizationsDevelopersAppsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperApp, error) { +func (c *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21343,7 +24769,7 @@ func (c *OrganizationsDevelopersAppsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperApp{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21355,25 +24781,30 @@ func (c *OrganizationsDevelopersAppsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a developer app. **Note**: The delete operation is asynchronous. The developer app is deleted immediately, but its associated resources, such as app keys or access tokens, may take anywhere from a few seconds to a few minutes to be deleted.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.developers.apps.delete", + // "description": "Approves or revokes the consumer key for an API product. After a consumer key is approved, the app can use it to access APIs. A consumer key that is revoked or pending cannot be used to access an API. Any access tokens associated with a revoked consumer key will remain active. However, Apigee checks the status of the consumer key and if set to `revoked` will not allow access to the API.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys/{keysId}/apiproducts/{apiproductsId}", + // "httpMethod": "POST", + // "id": "apigee.organizations.developers.apps.keys.apiproducts.updateDeveloperAppKeyApiProduct", // "parameterOrder": [ // "name" // ], // "parameters": { + // "action": { + // "description": "Approve or revoke the consumer key by setting this value to `approve` or `revoke`, respectively.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. Name of the developer app. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}`", + // "description": "Name of the API product in the developer app key in the following format: `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}/apiproducts/{apiproduct}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/keys/[^/]+/apiproducts/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperApp" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21382,65 +24813,44 @@ func (c *OrganizationsDevelopersAppsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.developers.apps.generateKeyPairOrUpdateDeveloperAppStatus": +// method id "apigee.organizations.developers.apps.keys.create.create": -type OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall struct { - s *Service - name string - googlecloudapigeev1developerapp *GoogleCloudApigeeV1DeveloperApp - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAppsKeysCreateCreateCall struct { + s *Service + parent string + googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GenerateKeyPairOrUpdateDeveloperAppStatus: Manages access to a -// developer app by enabling you to: * Approve or revoke a developer app -// * Generate a new consumer key and secret for a developer app To -// approve or revoke a developer app, set the `action` query parameter -// to `approved` or `revoked`, respectively, and the `Content-Type` -// header to `application/octet-stream`. If a developer app is revoked, -// none of its API keys are valid for API calls even though the keys are -// still `approved`. If successful, the API call returns the following -// HTTP status code: `204 No Content` To generate a new consumer key and -// secret for a developer app, pass the new key/secret details. Rather -// than replace an existing key, this API generates a new key. In this -// case, multiple key pairs may be associated with a single developer -// app. Each key pair has an independent status (`approved` or -// `revoked`) and expiration time. Any approved, non-expired key can be -// used in an API call. For example, if you're using API key rotation, -// you can generate new keys with expiration times that overlap keys -// that are going to expire. You might also generate a new consumer -// key/secret if the security of the original key/secret is compromised. -// The `keyExpiresIn` property defines the expiration time for the API -// key in milliseconds. If you don't set this property or set it to -// `-1`, the API key never expires. **Notes**: * When generating a new -// key/secret, this API replaces the existing attributes, notes, and -// callback URLs with those specified in the request. Include or exclude -// any existing information that you want to retain or delete, -// respectively. * To migrate existing consumer keys and secrets to -// hybrid from another system, see the CreateDeveloperAppKey API. +// Create: Creates a custom consumer key and secret for a developer app. +// This is particularly useful if you want to migrate existing consumer +// keys and secrets to Apigee from another system. Consumer keys and +// secrets can contain letters, numbers, underscores, and hyphens. No +// other special characters are allowed. To avoid service disruptions, a +// consumer key and secret should not exceed 2 KBs each. **Note**: When +// creating the consumer key and secret, an association to API products +// will not be made. Therefore, you should not specify the associated +// API products in your request. Instead, use the UpdateDeveloperAppKey +// API to make the association after the consumer key and secret are +// created. If a consumer key and secret already exist, you can keep +// them or delete them using the DeleteDeveloperAppKey API. // -// - name: Name of the developer app. Use the following structure in -// your request: -// `organizations/{org}/developers/{developer_email}/apps/{app}`. -func (r *OrganizationsDevelopersAppsService) GenerateKeyPairOrUpdateDeveloperAppStatus(name string, googlecloudapigeev1developerapp *GoogleCloudApigeeV1DeveloperApp) *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall { - c := &OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1developerapp = googlecloudapigeev1developerapp - return c -} - -// Action sets the optional parameter "action": Action. Valid values are -// `approve` or `revoke`. -func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall) Action(action string) *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall { - c.urlParams_.Set("action", action) +// - parent: Parent of the developer app key. Use the following +// structure in your request: +// `organizations/{org}/developers/{developer_email}/apps`. +func (r *OrganizationsDevelopersAppsKeysCreateService) Create(parent string, googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey) *OrganizationsDevelopersAppsKeysCreateCreateCall { + c := &OrganizationsDevelopersAppsKeysCreateCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1developerappkey = googlecloudapigeev1developerappkey return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall { +func (c *OrganizationsDevelopersAppsKeysCreateCreateCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysCreateCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21448,21 +24858,21 @@ func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCal // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall) Context(ctx context.Context) *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall { +func (c *OrganizationsDevelopersAppsKeysCreateCreateCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysCreateCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall) Header() http.Header { +func (c *OrganizationsDevelopersAppsKeysCreateCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAppsKeysCreateCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21470,14 +24880,14 @@ func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCal } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developerapp) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developerappkey) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keys/create") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -21485,19 +24895,20 @@ func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCal } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.generateKeyPairOrUpdateDeveloperAppStatus" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperApp or error will be +// Do executes the "apigee.organizations.developers.apps.keys.create.create" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperAppKey or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperApp.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 *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperApp, error) { +// either *GoogleCloudApigeeV1DeveloperAppKey.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 *OrganizationsDevelopersAppsKeysCreateCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperAppKey, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21516,7 +24927,7 @@ func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperApp{ + ret := &GoogleCloudApigeeV1DeveloperAppKey{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21528,33 +24939,28 @@ func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCal } return ret, nil // { - // "description": "Manages access to a developer app by enabling you to: * Approve or revoke a developer app * Generate a new consumer key and secret for a developer app To approve or revoke a developer app, set the `action` query parameter to `approved` or `revoked`, respectively, and the `Content-Type` header to `application/octet-stream`. If a developer app is revoked, none of its API keys are valid for API calls even though the keys are still `approved`. If successful, the API call returns the following HTTP status code: `204 No Content` To generate a new consumer key and secret for a developer app, pass the new key/secret details. Rather than replace an existing key, this API generates a new key. In this case, multiple key pairs may be associated with a single developer app. Each key pair has an independent status (`approved` or `revoked`) and expiration time. Any approved, non-expired key can be used in an API call. For example, if you're using API key rotation, you can generate new keys with expiration times that overlap keys that are going to expire. You might also generate a new consumer key/secret if the security of the original key/secret is compromised. The `keyExpiresIn` property defines the expiration time for the API key in milliseconds. If you don't set this property or set it to `-1`, the API key never expires. **Notes**: * When generating a new key/secret, this API replaces the existing attributes, notes, and callback URLs with those specified in the request. Include or exclude any existing information that you want to retain or delete, respectively. * To migrate existing consumer keys and secrets to hybrid from another system, see the CreateDeveloperAppKey API.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}", + // "description": "Creates a custom consumer key and secret for a developer app. This is particularly useful if you want to migrate existing consumer keys and secrets to Apigee from another system. Consumer keys and secrets can contain letters, numbers, underscores, and hyphens. No other special characters are allowed. To avoid service disruptions, a consumer key and secret should not exceed 2 KBs each. **Note**: When creating the consumer key and secret, an association to API products will not be made. Therefore, you should not specify the associated API products in your request. Instead, use the UpdateDeveloperAppKey API to make the association after the consumer key and secret are created. If a consumer key and secret already exist, you can keep them or delete them using the DeleteDeveloperAppKey API.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys/create", // "httpMethod": "POST", - // "id": "apigee.organizations.developers.apps.generateKeyPairOrUpdateDeveloperAppStatus", + // "id": "apigee.organizations.developers.apps.keys.create.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "action": { - // "description": "Action. Valid values are `approve` or `revoke`.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "Required. Name of the developer app. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}`", + // "parent": { + // "description": "Parent of the developer app key. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps`", // "location": "path", // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/keys/create", // "request": { - // "$ref": "GoogleCloudApigeeV1DeveloperApp" + // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperApp" + // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21563,97 +24969,66 @@ func (c *OrganizationsDevelopersAppsGenerateKeyPairOrUpdateDeveloperAppStatusCal } -// method id "apigee.organizations.developers.apps.get": +// method id "apigee.organizations.developers.attributes.delete": -type OrganizationsDevelopersAppsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAttributesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the details for a developer app. +// Delete: Deletes a developer attribute. // -// - name: Name of the developer app. Use the following structure in -// your request: -// `organizations/{org}/developers/{developer_email}/apps/{app}`. -func (r *OrganizationsDevelopersAppsService) Get(name string) *OrganizationsDevelopersAppsGetCall { - c := &OrganizationsDevelopersAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the developer attribute. Use the following structure +// in your request: +// `organizations/{org}/developers/{developer_email}/attributes/{attrib +// ute}`. +func (r *OrganizationsDevelopersAttributesService) Delete(name string) *OrganizationsDevelopersAttributesDeleteCall { + c := &OrganizationsDevelopersAttributesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Entity sets the optional parameter "entity": **Note**: Must be used -// in conjunction with the `query` parameter. Set to `apiresources` to -// return the number of API resources that have been approved for access -// by a developer app in the specified Apigee organization. -func (c *OrganizationsDevelopersAppsGetCall) Entity(entity string) *OrganizationsDevelopersAppsGetCall { - c.urlParams_.Set("entity", entity) - return c -} - -// Query sets the optional parameter "query": **Note**: Must be used in -// conjunction with the `entity` parameter. Set to `count` to return the -// number of API resources that have been approved for access by a -// developer app in the specified Apigee organization. -func (c *OrganizationsDevelopersAppsGetCall) Query(query string) *OrganizationsDevelopersAppsGetCall { - 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 *OrganizationsDevelopersAppsGetCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsGetCall { +func (c *OrganizationsDevelopersAttributesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAttributesDeleteCall { 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 *OrganizationsDevelopersAppsGetCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersAppsGetCall { - 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 *OrganizationsDevelopersAppsGetCall) Context(ctx context.Context) *OrganizationsDevelopersAppsGetCall { +func (c *OrganizationsDevelopersAttributesDeleteCall) Context(ctx context.Context) *OrganizationsDevelopersAttributesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsGetCall) Header() http.Header { +func (c *OrganizationsDevelopersAttributesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAttributesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -21664,14 +25039,14 @@ func (c *OrganizationsDevelopersAppsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.get" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperApp or error will be +// Do executes the "apigee.organizations.developers.attributes.delete" call. +// Exactly one of *GoogleCloudApigeeV1Attribute or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperApp.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 +// either *GoogleCloudApigeeV1Attribute.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 *OrganizationsDevelopersAppsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperApp, error) { +func (c *OrganizationsDevelopersAttributesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21690,7 +25065,7 @@ func (c *OrganizationsDevelopersAppsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperApp{ + ret := &GoogleCloudApigeeV1Attribute{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21702,35 +25077,25 @@ func (c *OrganizationsDevelopersAppsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns the details for a developer app.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.developers.apps.get", + // "description": "Deletes a developer attribute.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/attributes/{attributesId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.developers.attributes.delete", // "parameterOrder": [ // "name" // ], // "parameters": { - // "entity": { - // "description": "**Note**: Must be used in conjunction with the `query` parameter. Set to `apiresources` to return the number of API resources that have been approved for access by a developer app in the specified Apigee organization.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "Required. Name of the developer app. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}`", + // "description": "Required. Name of the developer attribute. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/attributes/{attribute}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/attributes/[^/]+$", // "required": true, // "type": "string" - // }, - // "query": { - // "description": "**Note**: Must be used in conjunction with the `entity` parameter. Set to `count` to return the number of API resources that have been approved for access by a developer app in the specified Apigee organization.", - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperApp" + // "$ref": "GoogleCloudApigeeV1Attribute" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21739,72 +25104,33 @@ func (c *OrganizationsDevelopersAppsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "apigee.organizations.developers.apps.list": +// method id "apigee.organizations.developers.attributes.get": -type OrganizationsDevelopersAppsListCall struct { +type OrganizationsDevelopersAttributesGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all apps created by a developer in an Apigee -// organization. Optionally, you can request an expanded view of the -// developer apps. A maximum of 100 developer apps are returned per API -// call. You can paginate the list of deveoper apps returned using the -// `startKey` and `count` query parameters. +// Get: Returns the value of the specified developer attribute. // -// - parent: Name of the developer. Use the following structure in your -// request: `organizations/{org}/developers/{developer_email}`. -func (r *OrganizationsDevelopersAppsService) List(parent string) *OrganizationsDevelopersAppsListCall { - c := &OrganizationsDevelopersAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Count sets the optional parameter "count": Number of developer apps -// to return in the API call. Use with the `startKey` parameter to -// provide more targeted filtering. The limit is 1000. -func (c *OrganizationsDevelopersAppsListCall) Count(count int64) *OrganizationsDevelopersAppsListCall { - c.urlParams_.Set("count", fmt.Sprint(count)) - return c -} - -// Expand sets the optional parameter "expand": Specifies whether to -// expand the results. Set to `true` to expand the results. This query -// parameter is not valid if you use the `count` or `startKey` query -// parameters. -func (c *OrganizationsDevelopersAppsListCall) Expand(expand bool) *OrganizationsDevelopersAppsListCall { - c.urlParams_.Set("expand", fmt.Sprint(expand)) - return c -} - -// ShallowExpand sets the optional parameter "shallowExpand": Specifies -// whether to expand the results in shallow mode. Set to `true` to -// expand the results in shallow mode. -func (c *OrganizationsDevelopersAppsListCall) ShallowExpand(shallowExpand bool) *OrganizationsDevelopersAppsListCall { - c.urlParams_.Set("shallowExpand", fmt.Sprint(shallowExpand)) - return c -} - -// StartKey sets the optional parameter "startKey": **Note**: Must be -// used in conjunction with the `count` parameter. Name of the developer -// app from which to start displaying the list of developer apps. For -// example, if you're returning 50 developer apps at a time (using the -// `count` query parameter), you can view developer apps 50-99 by -// entering the name of the 50th developer app. The developer app name -// is case sensitive. -func (c *OrganizationsDevelopersAppsListCall) StartKey(startKey string) *OrganizationsDevelopersAppsListCall { - c.urlParams_.Set("startKey", startKey) +// - name: Name of the developer attribute. Use the following structure +// in your request: +// `organizations/{org}/developers/{developer_email}/attributes/{attrib +// ute}`. +func (r *OrganizationsDevelopersAttributesService) Get(name string) *OrganizationsDevelopersAttributesGetCall { + c := &OrganizationsDevelopersAttributesGetCall{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 *OrganizationsDevelopersAppsListCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsListCall { +func (c *OrganizationsDevelopersAttributesGetCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAttributesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21814,7 +25140,7 @@ func (c *OrganizationsDevelopersAppsListCall) Fields(s ...googleapi.Field) *Orga // 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 *OrganizationsDevelopersAppsListCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersAppsListCall { +func (c *OrganizationsDevelopersAttributesGetCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersAttributesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -21822,21 +25148,21 @@ func (c *OrganizationsDevelopersAppsListCall) IfNoneMatch(entityTag string) *Org // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAppsListCall) Context(ctx context.Context) *OrganizationsDevelopersAppsListCall { +func (c *OrganizationsDevelopersAttributesGetCall) Context(ctx context.Context) *OrganizationsDevelopersAttributesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsListCall) Header() http.Header { +func (c *OrganizationsDevelopersAttributesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAttributesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21849,29 +25175,27 @@ func (c *OrganizationsDevelopersAppsListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apps") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } 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 "apigee.organizations.developers.apps.list" call. -// Exactly one of *GoogleCloudApigeeV1ListDeveloperAppsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListDeveloperAppsResponse.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 *OrganizationsDevelopersAppsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeveloperAppsResponse, error) { + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "apigee.organizations.developers.attributes.get" call. +// Exactly one of *GoogleCloudApigeeV1Attribute or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Attribute.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 *OrganizationsDevelopersAttributesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21890,7 +25214,7 @@ func (c *OrganizationsDevelopersAppsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListDeveloperAppsResponse{ + ret := &GoogleCloudApigeeV1Attribute{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21902,46 +25226,25 @@ func (c *OrganizationsDevelopersAppsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists all apps created by a developer in an Apigee organization. Optionally, you can request an expanded view of the developer apps. A maximum of 100 developer apps are returned per API call. You can paginate the list of deveoper apps returned using the `startKey` and `count` query parameters.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps", + // "description": "Returns the value of the specified developer attribute.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/attributes/{attributesId}", // "httpMethod": "GET", - // "id": "apigee.organizations.developers.apps.list", + // "id": "apigee.organizations.developers.attributes.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "count": { - // "description": "Number of developer apps to return in the API call. Use with the `startKey` parameter to provide more targeted filtering. The limit is 1000.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "expand": { - // "description": "Optional. Specifies whether to expand the results. Set to `true` to expand the results. This query parameter is not valid if you use the `count` or `startKey` query parameters.", - // "location": "query", - // "type": "boolean" - // }, - // "parent": { - // "description": "Required. Name of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", + // "name": { + // "description": "Required. Name of the developer attribute. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/attributes/{attribute}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/attributes/[^/]+$", // "required": true, // "type": "string" - // }, - // "shallowExpand": { - // "description": "Optional. Specifies whether to expand the results in shallow mode. Set to `true` to expand the results in shallow mode.", - // "location": "query", - // "type": "boolean" - // }, - // "startKey": { - // "description": "**Note**: Must be used in conjunction with the `count` parameter. Name of the developer app from which to start displaying the list of developer apps. For example, if you're returning 50 developer apps at a time (using the `count` query parameter), you can view developer apps 50-99 by entering the name of the 50th developer app. The developer app name is case sensitive.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/apps", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListDeveloperAppsResponse" + // "$ref": "GoogleCloudApigeeV1Attribute" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21950,100 +25253,97 @@ func (c *OrganizationsDevelopersAppsListCall) Do(opts ...googleapi.CallOption) ( } -// method id "apigee.organizations.developers.apps.update": +// method id "apigee.organizations.developers.attributes.list": -type OrganizationsDevelopersAppsUpdateCall struct { - s *Service - name string - googlecloudapigeev1developerapp *GoogleCloudApigeeV1DeveloperApp - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAttributesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates the details for a developer app. In addition, you can -// add an API product to a developer app and automatically generate an -// API key for the app to use when calling APIs in the API product. If -// you want to use an existing API key for the API product, add the API -// product to the API key using the UpdateDeveloperAppKey API. Using -// this API, you cannot update the following: * App name as it is the -// primary key used to identify the app and cannot be changed. * Scopes -// associated with the app. Instead, use the ReplaceDeveloperAppKey API. -// This API replaces the existing attributes with those specified in the -// request. Include or exclude any existing attributes that you want to -// retain or delete, respectively. +// List: Returns a list of all developer attributes. // -// - name: Name of the developer app. Use the following structure in -// your request: -// `organizations/{org}/developers/{developer_email}/apps/{app}`. -func (r *OrganizationsDevelopersAppsService) Update(name string, googlecloudapigeev1developerapp *GoogleCloudApigeeV1DeveloperApp) *OrganizationsDevelopersAppsUpdateCall { - c := &OrganizationsDevelopersAppsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1developerapp = googlecloudapigeev1developerapp +// - parent: Email address of the developer for which attributes are +// being listed. Use the following structure in your request: +// `organizations/{org}/developers/{developer_email}`. +func (r *OrganizationsDevelopersAttributesService) List(parent string) *OrganizationsDevelopersAttributesListCall { + c := &OrganizationsDevelopersAttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAppsUpdateCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsUpdateCall { +func (c *OrganizationsDevelopersAttributesListCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAttributesListCall { 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 *OrganizationsDevelopersAttributesListCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersAttributesListCall { + 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 *OrganizationsDevelopersAppsUpdateCall) Context(ctx context.Context) *OrganizationsDevelopersAppsUpdateCall { +func (c *OrganizationsDevelopersAttributesListCall) Context(ctx context.Context) *OrganizationsDevelopersAttributesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsUpdateCall) Header() http.Header { +func (c *OrganizationsDevelopersAttributesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAttributesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1developerapp) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.update" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperApp or error will be +// Do executes the "apigee.organizations.developers.attributes.list" call. +// Exactly one of *GoogleCloudApigeeV1Attributes or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperApp.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 +// either *GoogleCloudApigeeV1Attributes.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 *OrganizationsDevelopersAppsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperApp, error) { +func (c *OrganizationsDevelopersAttributesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attributes, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22062,7 +25362,7 @@ func (c *OrganizationsDevelopersAppsUpdateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperApp{ + ret := &GoogleCloudApigeeV1Attributes{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22074,28 +25374,25 @@ func (c *OrganizationsDevelopersAppsUpdateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates the details for a developer app. In addition, you can add an API product to a developer app and automatically generate an API key for the app to use when calling APIs in the API product. If you want to use an existing API key for the API product, add the API product to the API key using the UpdateDeveloperAppKey API. Using this API, you cannot update the following: * App name as it is the primary key used to identify the app and cannot be changed. * Scopes associated with the app. Instead, use the ReplaceDeveloperAppKey API. This API replaces the existing attributes with those specified in the request. Include or exclude any existing attributes that you want to retain or delete, respectively.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}", - // "httpMethod": "PUT", - // "id": "apigee.organizations.developers.apps.update", + // "description": "Returns a list of all developer attributes.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/attributes", + // "httpMethod": "GET", + // "id": "apigee.organizations.developers.attributes.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the developer app. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}`", + // "parent": { + // "description": "Required. Email address of the developer for which attributes are being listed. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1DeveloperApp" - // }, + // "path": "v1/{+parent}/attributes", // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperApp" + // "$ref": "GoogleCloudApigeeV1Attributes" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22104,32 +25401,40 @@ func (c *OrganizationsDevelopersAppsUpdateCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.developers.apps.attributes.delete": +// method id "apigee.organizations.developers.attributes.updateDeveloperAttribute": -type OrganizationsDevelopersAppsAttributesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall struct { + s *Service + name string + googlecloudapigeev1attribute *GoogleCloudApigeeV1Attribute + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a developer app attribute. +// UpdateDeveloperAttribute: Updates a developer attribute. **Note**: +// OAuth access tokens and Key Management Service (KMS) entities (apps, +// developers, and API products) are cached for 180 seconds (default). +// Any custom attributes associated with these entities are cached for +// at least 180 seconds after the entity is accessed at runtime. +// Therefore, an `ExpiresIn` element on the OAuthV2 policy won't be able +// to expire an access token in less than 180 seconds. // -// - name: Name of the developer app attribute. Use the following -// structure in your request: -// `organizations/{org}/developers/{developer_email}/apps/{app}/attribu -// tes/{attribute}`. -func (r *OrganizationsDevelopersAppsAttributesService) Delete(name string) *OrganizationsDevelopersAppsAttributesDeleteCall { - c := &OrganizationsDevelopersAppsAttributesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the developer attribute. Use the following structure +// in your request: +// `organizations/{org}/developers/{developer_email}/attributes/{attrib +// ute}`. +func (r *OrganizationsDevelopersAttributesService) UpdateDeveloperAttribute(name string, googlecloudapigeev1attribute *GoogleCloudApigeeV1Attribute) *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall { + c := &OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudapigeev1attribute = googlecloudapigeev1attribute return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAppsAttributesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsAttributesDeleteCall { +func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22137,21 +25442,21 @@ func (c *OrganizationsDevelopersAppsAttributesDeleteCall) Fields(s ...googleapi. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAppsAttributesDeleteCall) Context(ctx context.Context) *OrganizationsDevelopersAppsAttributesDeleteCall { +func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) Context(ctx context.Context) *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsAttributesDeleteCall) Header() http.Header { +func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsAttributesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22159,11 +25464,16 @@ func (c *OrganizationsDevelopersAppsAttributesDeleteCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1attribute) + 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -22174,14 +25484,14 @@ func (c *OrganizationsDevelopersAppsAttributesDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.attributes.delete" call. +// Do executes the "apigee.organizations.developers.attributes.updateDeveloperAttribute" call. // Exactly one of *GoogleCloudApigeeV1Attribute or error will be // non-nil. Any non-2xx status code is an error. Response headers are in // either *GoogleCloudApigeeV1Attribute.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 *OrganizationsDevelopersAppsAttributesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { +func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22212,23 +25522,26 @@ func (c *OrganizationsDevelopersAppsAttributesDeleteCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Deletes a developer app attribute.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/attributes/{attributesId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.developers.apps.attributes.delete", + // "description": "Updates a developer attribute. **Note**: OAuth access tokens and Key Management Service (KMS) entities (apps, developers, and API products) are cached for 180 seconds (default). Any custom attributes associated with these entities are cached for at least 180 seconds after the entity is accessed at runtime. Therefore, an `ExpiresIn` element on the OAuthV2 policy won't be able to expire an access token in less than 180 seconds.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/attributes/{attributesId}", + // "httpMethod": "POST", + // "id": "apigee.organizations.developers.attributes.updateDeveloperAttribute", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the developer app attribute. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}/attributes/{attribute}`", + // "description": "Required. Name of the developer attribute. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/attributes/{attribute}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/attributes/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/attributes/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1Attribute" + // }, // "response": { // "$ref": "GoogleCloudApigeeV1Attribute" // }, @@ -22239,80 +25552,74 @@ func (c *OrganizationsDevelopersAppsAttributesDeleteCall) Do(opts ...googleapi.C } -// method id "apigee.organizations.developers.apps.attributes.get": +// method id "apigee.organizations.developers.balance.adjust": -type OrganizationsDevelopersAppsAttributesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersBalanceAdjustCall struct { + s *Service + name string + googlecloudapigeev1adjustdeveloperbalancerequest *GoogleCloudApigeeV1AdjustDeveloperBalanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns a developer app attribute. +// Adjust: Adjust the prepaid balance for the developer. This API will +// be used in scenarios where the developer has been under-charged or +// over-charged. // -// - name: Name of the developer app attribute. Use the following +// - name: Account balance for the developer. Use the following // structure in your request: -// `organizations/{org}/developers/{developer_email}/apps/{app}/attribu -// tes/{attribute}`. -func (r *OrganizationsDevelopersAppsAttributesService) Get(name string) *OrganizationsDevelopersAppsAttributesGetCall { - c := &OrganizationsDevelopersAppsAttributesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `organizations/{org}/developers/{developer}/balance`. +func (r *OrganizationsDevelopersBalanceService) Adjust(name string, googlecloudapigeev1adjustdeveloperbalancerequest *GoogleCloudApigeeV1AdjustDeveloperBalanceRequest) *OrganizationsDevelopersBalanceAdjustCall { + c := &OrganizationsDevelopersBalanceAdjustCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudapigeev1adjustdeveloperbalancerequest = googlecloudapigeev1adjustdeveloperbalancerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAppsAttributesGetCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsAttributesGetCall { +func (c *OrganizationsDevelopersBalanceAdjustCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersBalanceAdjustCall { 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 *OrganizationsDevelopersAppsAttributesGetCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersAppsAttributesGetCall { - 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 *OrganizationsDevelopersAppsAttributesGetCall) Context(ctx context.Context) *OrganizationsDevelopersAppsAttributesGetCall { +func (c *OrganizationsDevelopersBalanceAdjustCall) Context(ctx context.Context) *OrganizationsDevelopersBalanceAdjustCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsAttributesGetCall) Header() http.Header { +func (c *OrganizationsDevelopersBalanceAdjustCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsAttributesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersBalanceAdjustCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1adjustdeveloperbalancerequest) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:adjust") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -22323,14 +25630,15 @@ func (c *OrganizationsDevelopersAppsAttributesGetCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.attributes.get" call. -// Exactly one of *GoogleCloudApigeeV1Attribute or error will be +// Do executes the "apigee.organizations.developers.balance.adjust" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperBalance or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Attribute.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 *OrganizationsDevelopersAppsAttributesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { +// either *GoogleCloudApigeeV1DeveloperBalance.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 *OrganizationsDevelopersBalanceAdjustCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperBalance, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22349,7 +25657,7 @@ func (c *OrganizationsDevelopersAppsAttributesGetCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Attribute{ + ret := &GoogleCloudApigeeV1DeveloperBalance{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22361,25 +25669,28 @@ func (c *OrganizationsDevelopersAppsAttributesGetCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Returns a developer app attribute.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/attributes/{attributesId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.developers.apps.attributes.get", + // "description": "Adjust the prepaid balance for the developer. This API will be used in scenarios where the developer has been under-charged or over-charged.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/balance:adjust", + // "httpMethod": "POST", + // "id": "apigee.organizations.developers.balance.adjust", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the developer app attribute. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}/attributes/{attribute}`", + // "description": "Required. Account balance for the developer. Use the following structure in your request: `organizations/{org}/developers/{developer}/balance`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/attributes/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/balance$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}:adjust", + // "request": { + // "$ref": "GoogleCloudApigeeV1AdjustDeveloperBalanceRequest" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Attribute" + // "$ref": "GoogleCloudApigeeV1DeveloperBalance" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22388,97 +25699,91 @@ func (c *OrganizationsDevelopersAppsAttributesGetCall) Do(opts ...googleapi.Call } -// method id "apigee.organizations.developers.apps.attributes.list": +// method id "apigee.organizations.developers.balance.credit": -type OrganizationsDevelopersAppsAttributesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersBalanceCreditCall struct { + s *Service + name string + googlecloudapigeev1creditdeveloperbalancerequest *GoogleCloudApigeeV1CreditDeveloperBalanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Returns a list of all developer app attributes. +// Credit: Credits the account balance for the developer. // -// - parent: Name of the developer app. Use the following structure in -// your request: -// `organizations/{org}/developers/{developer_email}/apps/{app}`. -func (r *OrganizationsDevelopersAppsAttributesService) List(parent string) *OrganizationsDevelopersAppsAttributesListCall { - c := &OrganizationsDevelopersAppsAttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Account balance for the developer. Use the following +// structure in your request: +// `organizations/{org}/developers/{developer}/balance`. +func (r *OrganizationsDevelopersBalanceService) Credit(name string, googlecloudapigeev1creditdeveloperbalancerequest *GoogleCloudApigeeV1CreditDeveloperBalanceRequest) *OrganizationsDevelopersBalanceCreditCall { + c := &OrganizationsDevelopersBalanceCreditCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1creditdeveloperbalancerequest = googlecloudapigeev1creditdeveloperbalancerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAppsAttributesListCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsAttributesListCall { +func (c *OrganizationsDevelopersBalanceCreditCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersBalanceCreditCall { 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 *OrganizationsDevelopersAppsAttributesListCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersAppsAttributesListCall { - 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 *OrganizationsDevelopersAppsAttributesListCall) Context(ctx context.Context) *OrganizationsDevelopersAppsAttributesListCall { +func (c *OrganizationsDevelopersBalanceCreditCall) Context(ctx context.Context) *OrganizationsDevelopersBalanceCreditCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsAttributesListCall) Header() http.Header { +func (c *OrganizationsDevelopersBalanceCreditCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsAttributesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersBalanceCreditCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1creditdeveloperbalancerequest) + 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, "v1/{+parent}/attributes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:credit") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.attributes.list" call. -// Exactly one of *GoogleCloudApigeeV1Attributes or error will be +// Do executes the "apigee.organizations.developers.balance.credit" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperBalance or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Attributes.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 *OrganizationsDevelopersAppsAttributesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attributes, error) { +// either *GoogleCloudApigeeV1DeveloperBalance.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 *OrganizationsDevelopersBalanceCreditCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperBalance, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22497,7 +25802,7 @@ func (c *OrganizationsDevelopersAppsAttributesListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Attributes{ + ret := &GoogleCloudApigeeV1DeveloperBalance{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22509,25 +25814,28 @@ func (c *OrganizationsDevelopersAppsAttributesListCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Returns a list of all developer app attributes.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/attributes", - // "httpMethod": "GET", - // "id": "apigee.organizations.developers.apps.attributes.list", + // "description": "Credits the account balance for the developer.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/balance:credit", + // "httpMethod": "POST", + // "id": "apigee.organizations.developers.balance.credit", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name of the developer app. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}`", + // "name": { + // "description": "Required. Account balance for the developer. Use the following structure in your request: `organizations/{org}/developers/{developer}/balance`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/balance$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/attributes", + // "path": "v1/{+name}:credit", + // "request": { + // "$ref": "GoogleCloudApigeeV1CreditDeveloperBalanceRequest" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Attributes" + // "$ref": "GoogleCloudApigeeV1DeveloperBalance" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22536,41 +25844,33 @@ func (c *OrganizationsDevelopersAppsAttributesListCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.developers.apps.attributes.updateDeveloperAppAttribute": +// method id "apigee.organizations.developers.subscriptions.create": -type OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall struct { - s *Service - name string - googlecloudapigeev1attribute *GoogleCloudApigeeV1Attribute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersSubscriptionsCreateCall struct { + s *Service + parent string + googlecloudapigeev1developersubscription *GoogleCloudApigeeV1DeveloperSubscription + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateDeveloperAppAttribute: Updates a developer app attribute. -// **Note**: OAuth access tokens and Key Management Service (KMS) -// entities (apps, developers, and API products) are cached for 180 -// seconds (current default). Any custom attributes associated with -// these entities are cached for at least 180 seconds after the entity -// is accessed at runtime. Therefore, an `ExpiresIn` element on the -// OAuthV2 policy won't be able to expire an access token in less than -// 180 seconds. +// Create: Creates a subscription to an API product. // -// - name: Name of the developer app attribute. Use the following -// structure in your request: -// `organizations/{org}/developers/{developer_email}/apps/{app}/attribu -// tes/{attribute}`. -func (r *OrganizationsDevelopersAppsAttributesService) UpdateDeveloperAppAttribute(name string, googlecloudapigeev1attribute *GoogleCloudApigeeV1Attribute) *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall { - c := &OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1attribute = googlecloudapigeev1attribute +// - parent: Email address of the developer that is purchasing a +// subscription to the API product. Use the following structure in +// your request: `organizations/{org}/developers/{developer_email}`. +func (r *OrganizationsDevelopersSubscriptionsService) Create(parent string, googlecloudapigeev1developersubscription *GoogleCloudApigeeV1DeveloperSubscription) *OrganizationsDevelopersSubscriptionsCreateCall { + c := &OrganizationsDevelopersSubscriptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1developersubscription = googlecloudapigeev1developersubscription return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall { +func (c *OrganizationsDevelopersSubscriptionsCreateCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersSubscriptionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22578,21 +25878,21 @@ func (c *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) F // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) Context(ctx context.Context) *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall { +func (c *OrganizationsDevelopersSubscriptionsCreateCall) Context(ctx context.Context) *OrganizationsDevelopersSubscriptionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) Header() http.Header { +func (c *OrganizationsDevelopersSubscriptionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersSubscriptionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22600,14 +25900,14 @@ func (c *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) d } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1attribute) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developersubscription) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/subscriptions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22615,19 +25915,21 @@ func (c *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) d } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.attributes.updateDeveloperAppAttribute" call. -// Exactly one of *GoogleCloudApigeeV1Attribute or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Attribute.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 *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { +// Do executes the "apigee.organizations.developers.subscriptions.create" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperSubscription or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1DeveloperSubscription.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 *OrganizationsDevelopersSubscriptionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperSubscription, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22646,7 +25948,7 @@ func (c *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) D if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Attribute{ + ret := &GoogleCloudApigeeV1DeveloperSubscription{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22658,28 +25960,28 @@ func (c *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) D } return ret, nil // { - // "description": "Updates a developer app attribute. **Note**: OAuth access tokens and Key Management Service (KMS) entities (apps, developers, and API products) are cached for 180 seconds (current default). Any custom attributes associated with these entities are cached for at least 180 seconds after the entity is accessed at runtime. Therefore, an `ExpiresIn` element on the OAuthV2 policy won't be able to expire an access token in less than 180 seconds.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/attributes/{attributesId}", + // "description": "Creates a subscription to an API product. ", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/subscriptions", // "httpMethod": "POST", - // "id": "apigee.organizations.developers.apps.attributes.updateDeveloperAppAttribute", + // "id": "apigee.organizations.developers.subscriptions.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the developer app attribute. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}/attributes/{attribute}`", + // "parent": { + // "description": "Required. Email address of the developer that is purchasing a subscription to the API product. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/attributes/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/subscriptions", // "request": { - // "$ref": "GoogleCloudApigeeV1Attribute" + // "$ref": "GoogleCloudApigeeV1DeveloperSubscription" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Attribute" + // "$ref": "GoogleCloudApigeeV1DeveloperSubscription" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22688,44 +25990,34 @@ func (c *OrganizationsDevelopersAppsAttributesUpdateDeveloperAppAttributeCall) D } -// method id "apigee.organizations.developers.apps.keys.create": +// method id "apigee.organizations.developers.subscriptions.expire": -type OrganizationsDevelopersAppsKeysCreateCall struct { - s *Service - parent string - googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersSubscriptionsExpireCall struct { + s *Service + name string + googlecloudapigeev1expiredevelopersubscriptionrequest *GoogleCloudApigeeV1ExpireDeveloperSubscriptionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a custom consumer key and secret for a developer app. -// This is particularly useful if you want to migrate existing consumer -// keys and secrets to Apigee from another system. Consumer keys and -// secrets can contain letters, numbers, underscores, and hyphens. No -// other special characters are allowed. To avoid service disruptions, a -// consumer key and secret should not exceed 2 KBs each. **Note**: When -// creating the consumer key and secret, an association to API products -// will not be made. Therefore, you should not specify the associated -// API products in your request. Instead, use the UpdateDeveloperAppKey -// API to make the association after the consumer key and secret are -// created. If a consumer key and secret already exist, you can keep -// them or delete them using the DeleteDeveloperAppKey API. +// Expire: Expires an API product subscription immediately. // -// - parent: Parent of the developer app key. Use the following +// - name: Name of the API product subscription. Use the following // structure in your request: -// `organizations/{org}/developers/{developer_email}/apps`. -func (r *OrganizationsDevelopersAppsKeysService) Create(parent string, googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey) *OrganizationsDevelopersAppsKeysCreateCall { - c := &OrganizationsDevelopersAppsKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1developerappkey = googlecloudapigeev1developerappkey +// `organizations/{org}/developers/{developer_email}/subscriptions/{sub +// scription}`. +func (r *OrganizationsDevelopersSubscriptionsService) Expire(name string, googlecloudapigeev1expiredevelopersubscriptionrequest *GoogleCloudApigeeV1ExpireDeveloperSubscriptionRequest) *OrganizationsDevelopersSubscriptionsExpireCall { + c := &OrganizationsDevelopersSubscriptionsExpireCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1expiredevelopersubscriptionrequest = googlecloudapigeev1expiredevelopersubscriptionrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAppsKeysCreateCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysCreateCall { +func (c *OrganizationsDevelopersSubscriptionsExpireCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersSubscriptionsExpireCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22733,21 +26025,21 @@ func (c *OrganizationsDevelopersAppsKeysCreateCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAppsKeysCreateCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysCreateCall { +func (c *OrganizationsDevelopersSubscriptionsExpireCall) Context(ctx context.Context) *OrganizationsDevelopersSubscriptionsExpireCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsKeysCreateCall) Header() http.Header { +func (c *OrganizationsDevelopersSubscriptionsExpireCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsKeysCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersSubscriptionsExpireCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22755,14 +26047,14 @@ func (c *OrganizationsDevelopersAppsKeysCreateCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developerappkey) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1expiredevelopersubscriptionrequest) 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, "v1/{+parent}/keys") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:expire") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22770,20 +26062,21 @@ func (c *OrganizationsDevelopersAppsKeysCreateCall) doRequest(alt string) (*http } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.keys.create" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperAppKey or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperAppKey.ServerResponse.Header or +// Do executes the "apigee.organizations.developers.subscriptions.expire" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperSubscription or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1DeveloperSubscription.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 *OrganizationsDevelopersAppsKeysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperAppKey, error) { +func (c *OrganizationsDevelopersSubscriptionsExpireCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperSubscription, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22802,7 +26095,7 @@ func (c *OrganizationsDevelopersAppsKeysCreateCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperAppKey{ + ret := &GoogleCloudApigeeV1DeveloperSubscription{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22814,28 +26107,28 @@ func (c *OrganizationsDevelopersAppsKeysCreateCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Creates a custom consumer key and secret for a developer app. This is particularly useful if you want to migrate existing consumer keys and secrets to Apigee from another system. Consumer keys and secrets can contain letters, numbers, underscores, and hyphens. No other special characters are allowed. To avoid service disruptions, a consumer key and secret should not exceed 2 KBs each. **Note**: When creating the consumer key and secret, an association to API products will not be made. Therefore, you should not specify the associated API products in your request. Instead, use the UpdateDeveloperAppKey API to make the association after the consumer key and secret are created. If a consumer key and secret already exist, you can keep them or delete them using the DeleteDeveloperAppKey API.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys", + // "description": "Expires an API product subscription immediately.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/subscriptions/{subscriptionsId}:expire", // "httpMethod": "POST", - // "id": "apigee.organizations.developers.apps.keys.create", + // "id": "apigee.organizations.developers.subscriptions.expire", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Parent of the developer app key. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps`", + // "name": { + // "description": "Required. Name of the API product subscription. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/subscriptions/{subscription}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/subscriptions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/keys", + // "path": "v1/{+name}:expire", // "request": { - // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" + // "$ref": "GoogleCloudApigeeV1ExpireDeveloperSubscriptionRequest" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" + // "$ref": "GoogleCloudApigeeV1DeveloperSubscription" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22844,30 +26137,25 @@ func (c *OrganizationsDevelopersAppsKeysCreateCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.developers.apps.keys.delete": +// method id "apigee.organizations.developers.subscriptions.get": -type OrganizationsDevelopersAppsKeysDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsDevelopersSubscriptionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an app's consumer key and removes all API products -// associated with the app. After the consumer key is deleted, it cannot -// be used to access any APIs. **Note**: After you delete a consumer -// key, you may want to: 1. Create a new consumer key and secret for the -// developer app using the CreateDeveloperAppKey API, and subsequently -// add an API product to the key using the UpdateDeveloperAppKey API. 2. -// Delete the developer app, if it is no longer required. +// Get: Gets details for an API product subscription. // -// - name: Name of the developer app key. Use the following structure in -// your request: -// `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{k -// ey}`. -func (r *OrganizationsDevelopersAppsKeysService) Delete(name string) *OrganizationsDevelopersAppsKeysDeleteCall { - c := &OrganizationsDevelopersAppsKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the API product subscription. Use the following +// structure in your request: +// `organizations/{org}/developers/{developer_email}/subscriptions/{sub +// scription}`. +func (r *OrganizationsDevelopersSubscriptionsService) Get(name string) *OrganizationsDevelopersSubscriptionsGetCall { + c := &OrganizationsDevelopersSubscriptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -22875,41 +26163,54 @@ func (r *OrganizationsDevelopersAppsKeysService) Delete(name string) *Organizati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAppsKeysDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysDeleteCall { +func (c *OrganizationsDevelopersSubscriptionsGetCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersSubscriptionsGetCall { 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 *OrganizationsDevelopersSubscriptionsGetCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersSubscriptionsGetCall { + 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 *OrganizationsDevelopersAppsKeysDeleteCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysDeleteCall { +func (c *OrganizationsDevelopersSubscriptionsGetCall) Context(ctx context.Context) *OrganizationsDevelopersSubscriptionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsKeysDeleteCall) Header() http.Header { +func (c *OrganizationsDevelopersSubscriptionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsKeysDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersSubscriptionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -22920,15 +26221,16 @@ func (c *OrganizationsDevelopersAppsKeysDeleteCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.keys.delete" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperAppKey or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperAppKey.ServerResponse.Header or +// Do executes the "apigee.organizations.developers.subscriptions.get" call. +// Exactly one of *GoogleCloudApigeeV1DeveloperSubscription or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1DeveloperSubscription.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 *OrganizationsDevelopersAppsKeysDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperAppKey, error) { +func (c *OrganizationsDevelopersSubscriptionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperSubscription, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22947,7 +26249,7 @@ func (c *OrganizationsDevelopersAppsKeysDeleteCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperAppKey{ + ret := &GoogleCloudApigeeV1DeveloperSubscription{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22959,25 +26261,25 @@ func (c *OrganizationsDevelopersAppsKeysDeleteCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Deletes an app's consumer key and removes all API products associated with the app. After the consumer key is deleted, it cannot be used to access any APIs. **Note**: After you delete a consumer key, you may want to: 1. Create a new consumer key and secret for the developer app using the CreateDeveloperAppKey API, and subsequently add an API product to the key using the UpdateDeveloperAppKey API. 2. Delete the developer app, if it is no longer required.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys/{keysId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.developers.apps.keys.delete", + // "description": "Gets details for an API product subscription.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/subscriptions/{subscriptionsId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.developers.subscriptions.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Name of the developer app key. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}`", + // "description": "Required. Name of the API product subscription. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/subscriptions/{subscription}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/keys/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+/subscriptions/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" + // "$ref": "GoogleCloudApigeeV1DeveloperSubscription" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22986,35 +26288,51 @@ func (c *OrganizationsDevelopersAppsKeysDeleteCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.developers.apps.keys.get": +// method id "apigee.organizations.developers.subscriptions.list": -type OrganizationsDevelopersAppsKeysGetCall struct { +type OrganizationsDevelopersSubscriptionsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets details for a consumer key for a developer app, including -// the key and secret value, associated API products, and other -// information. +// List: Lists all API product subscriptions for a developer. // -// - name: Name of the developer app key. Use the following structure in -// your request: -// `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{k -// ey}`. -func (r *OrganizationsDevelopersAppsKeysService) Get(name string) *OrganizationsDevelopersAppsKeysGetCall { - c := &OrganizationsDevelopersAppsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Email address of the developer. Use the following structure +// in your request: `organizations/{org}/developers/{developer_email}`. +func (r *OrganizationsDevelopersSubscriptionsService) List(parent string) *OrganizationsDevelopersSubscriptionsListCall { + c := &OrganizationsDevelopersSubscriptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Count sets the optional parameter "count": Number of API product +// subscriptions to return in the API call. Use with `startKey` to +// provide more targeted filtering. Defaults to 100. The maximum limit +// is 1000. +func (c *OrganizationsDevelopersSubscriptionsListCall) Count(count int64) *OrganizationsDevelopersSubscriptionsListCall { + c.urlParams_.Set("count", fmt.Sprint(count)) + return c +} + +// StartKey sets the optional parameter "startKey": Name of the API +// product subscription from which to start displaying the list of +// subscriptions. If omitted, the list starts from the first item. For +// example, to view the API product subscriptions from 51-150, set the +// value of `startKey` to the name of the 51st subscription and set the +// value of `count` to 100. +func (c *OrganizationsDevelopersSubscriptionsListCall) StartKey(startKey string) *OrganizationsDevelopersSubscriptionsListCall { + c.urlParams_.Set("startKey", startKey) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAppsKeysGetCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysGetCall { +func (c *OrganizationsDevelopersSubscriptionsListCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersSubscriptionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23024,7 +26342,7 @@ func (c *OrganizationsDevelopersAppsKeysGetCall) Fields(s ...googleapi.Field) *O // 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 *OrganizationsDevelopersAppsKeysGetCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersAppsKeysGetCall { +func (c *OrganizationsDevelopersSubscriptionsListCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersSubscriptionsListCall { c.ifNoneMatch_ = entityTag return c } @@ -23032,21 +26350,21 @@ func (c *OrganizationsDevelopersAppsKeysGetCall) IfNoneMatch(entityTag string) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAppsKeysGetCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysGetCall { +func (c *OrganizationsDevelopersSubscriptionsListCall) Context(ctx context.Context) *OrganizationsDevelopersSubscriptionsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsKeysGetCall) Header() http.Header { +func (c *OrganizationsDevelopersSubscriptionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsKeysGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsDevelopersSubscriptionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23059,7 +26377,7 @@ func (c *OrganizationsDevelopersAppsKeysGetCall) doRequest(alt string) (*http.Re var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/subscriptions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -23067,20 +26385,21 @@ func (c *OrganizationsDevelopersAppsKeysGetCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.keys.get" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperAppKey or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperAppKey.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "apigee.organizations.developers.subscriptions.list" call. +// Exactly one of *GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse.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 *OrganizationsDevelopersAppsKeysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperAppKey, error) { +func (c *OrganizationsDevelopersSubscriptionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23099,7 +26418,7 @@ func (c *OrganizationsDevelopersAppsKeysGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperAppKey{ + ret := &GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23111,25 +26430,36 @@ func (c *OrganizationsDevelopersAppsKeysGetCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Gets details for a consumer key for a developer app, including the key and secret value, associated API products, and other information.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys/{keysId}", + // "description": "Lists all API product subscriptions for a developer.", + // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/subscriptions", // "httpMethod": "GET", - // "id": "apigee.organizations.developers.apps.keys.get", + // "id": "apigee.organizations.developers.subscriptions.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Name of the developer app key. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}`", + // "count": { + // "description": "Number of API product subscriptions to return in the API call. Use with `startKey` to provide more targeted filtering. Defaults to 100. The maximum limit is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "parent": { + // "description": "Required. Email address of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/keys/[^/]+$", + // "pattern": "^organizations/[^/]+/developers/[^/]+$", // "required": true, // "type": "string" + // }, + // "startKey": { + // "description": "Name of the API product subscription from which to start displaying the list of subscriptions. If omitted, the list starts from the first item. For example, to view the API product subscriptions from 51-150, set the value of `startKey` to the name of the 51st subscription and set the value of `count` to 100.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/subscriptions", // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" + // "$ref": "GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23138,40 +26468,41 @@ func (c *OrganizationsDevelopersAppsKeysGetCall) Do(opts ...googleapi.CallOption } -// method id "apigee.organizations.developers.apps.keys.replaceDeveloperAppKey": +// method id "apigee.organizations.endpointAttachments.create": -type OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall struct { - s *Service - name string - googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEndpointAttachmentsCreateCall struct { + s *Service + parent string + googlecloudapigeev1endpointattachment *GoogleCloudApigeeV1EndpointAttachment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ReplaceDeveloperAppKey: Updates the scope of an app. This API -// replaces the existing scopes with those specified in the request. -// Include or exclude any existing scopes that you want to retain or -// delete, respectively. The specified scopes must already be defined -// for the API products associated with the app. This API sets the -// `scopes` element under the `apiProducts` element in the attributes of -// the app. +// Create: Creates an endpoint attachment. **Note:** Not supported for +// Apigee hybrid. // -// - name: Name of the developer app key. Use the following structure in -// your request: -// `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{k -// ey}`. -func (r *OrganizationsDevelopersAppsKeysService) ReplaceDeveloperAppKey(name string, googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey) *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall { - c := &OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1developerappkey = googlecloudapigeev1developerappkey +// - parent: Organization the endpoint attachment will be created in. +func (r *OrganizationsEndpointAttachmentsService) Create(parent string, googlecloudapigeev1endpointattachment *GoogleCloudApigeeV1EndpointAttachment) *OrganizationsEndpointAttachmentsCreateCall { + c := &OrganizationsEndpointAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1endpointattachment = googlecloudapigeev1endpointattachment + return c +} + +// EndpointAttachmentId sets the optional parameter +// "endpointAttachmentId": ID to use for the endpoint attachment. The ID +// can contain lowercase letters and numbers, must start with a letter, +// and must be 1-20 characters in length. +func (c *OrganizationsEndpointAttachmentsCreateCall) EndpointAttachmentId(endpointAttachmentId string) *OrganizationsEndpointAttachmentsCreateCall { + c.urlParams_.Set("endpointAttachmentId", endpointAttachmentId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall { +func (c *OrganizationsEndpointAttachmentsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEndpointAttachmentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23179,21 +26510,21 @@ func (c *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) Fields(s ... // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall { +func (c *OrganizationsEndpointAttachmentsCreateCall) Context(ctx context.Context) *OrganizationsEndpointAttachmentsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) Header() http.Header { +func (c *OrganizationsEndpointAttachmentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEndpointAttachmentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23201,35 +26532,34 @@ func (c *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) doRequest(al } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developerappkey) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1endpointattachment) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpointAttachments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.keys.replaceDeveloperAppKey" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperAppKey or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperAppKey.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 *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperAppKey, error) { +// Do executes the "apigee.organizations.endpointAttachments.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 *OrganizationsEndpointAttachmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23248,7 +26578,7 @@ func (c *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperAppKey{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23260,28 +26590,33 @@ func (c *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) Do(opts ...g } return ret, nil // { - // "description": "Updates the scope of an app. This API replaces the existing scopes with those specified in the request. Include or exclude any existing scopes that you want to retain or delete, respectively. The specified scopes must already be defined for the API products associated with the app. This API sets the `scopes` element under the `apiProducts` element in the attributes of the app.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys/{keysId}", - // "httpMethod": "PUT", - // "id": "apigee.organizations.developers.apps.keys.replaceDeveloperAppKey", + // "description": "Creates an endpoint attachment. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/endpointAttachments", + // "httpMethod": "POST", + // "id": "apigee.organizations.endpointAttachments.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Name of the developer app key. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}`", + // "endpointAttachmentId": { + // "description": "ID to use for the endpoint attachment. The ID can contain lowercase letters and numbers, must start with a letter, and must be 1-20 characters in length.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Organization the endpoint attachment will be created in.", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/keys/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/endpointAttachments", // "request": { - // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" + // "$ref": "GoogleCloudApigeeV1EndpointAttachment" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23290,49 +26625,31 @@ func (c *OrganizationsDevelopersAppsKeysReplaceDeveloperAppKeyCall) Do(opts ...g } -// method id "apigee.organizations.developers.apps.keys.updateDeveloperAppKey": +// method id "apigee.organizations.endpointAttachments.delete": -type OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall struct { - s *Service - name string - googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEndpointAttachmentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateDeveloperAppKey: Adds an API product to a developer app key, -// enabling the app that holds the key to access the API resources -// bundled in the API product. In addition, you can add attributes to a -// developer app key. This API replaces the existing attributes with -// those specified in the request. Include or exclude any existing -// attributes that you want to retain or delete, respectively. You can -// use the same key to access all API products associated with the app. +// Delete: Deletes an endpoint attachment. // -// - name: Name of the developer app key. Use the following structure in -// your request: -// `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{k -// ey}`. -func (r *OrganizationsDevelopersAppsKeysService) UpdateDeveloperAppKey(name string, googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey) *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall { - c := &OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the endpoint attachment. Use the following structure +// in your request: +// `organizations/{org}/endpointAttachments/{endpoint_attachment}`. +func (r *OrganizationsEndpointAttachmentsService) Delete(name string) *OrganizationsEndpointAttachmentsDeleteCall { + c := &OrganizationsEndpointAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1developerappkey = googlecloudapigeev1developerappkey - return c -} - -// Action sets the optional parameter "action": Approve or revoke the -// consumer key by setting this value to `approve` or `revoke`, -// respectively. The `Content-Type` header must be set to -// `application/octet-stream`. -func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Action(action string) *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall { - c.urlParams_.Set("action", action) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall { +func (c *OrganizationsEndpointAttachmentsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEndpointAttachmentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23340,21 +26657,21 @@ func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Fields(s ...g // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall { +func (c *OrganizationsEndpointAttachmentsDeleteCall) Context(ctx context.Context) *OrganizationsEndpointAttachmentsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Header() http.Header { +func (c *OrganizationsEndpointAttachmentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEndpointAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23362,16 +26679,11 @@ func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) doRequest(alt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developerappkey) - 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -23382,15 +26694,14 @@ func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.keys.updateDeveloperAppKey" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperAppKey or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperAppKey.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 *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperAppKey, error) { +// Do executes the "apigee.organizations.endpointAttachments.delete" 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 *OrganizationsEndpointAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23409,7 +26720,7 @@ func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperAppKey{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23421,33 +26732,25 @@ func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Do(opts ...go } return ret, nil // { - // "description": "Adds an API product to a developer app key, enabling the app that holds the key to access the API resources bundled in the API product. In addition, you can add attributes to a developer app key. This API replaces the existing attributes with those specified in the request. Include or exclude any existing attributes that you want to retain or delete, respectively. You can use the same key to access all API products associated with the app.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys/{keysId}", - // "httpMethod": "POST", - // "id": "apigee.organizations.developers.apps.keys.updateDeveloperAppKey", + // "description": "Deletes an endpoint attachment.", + // "flatPath": "v1/organizations/{organizationsId}/endpointAttachments/{endpointAttachmentsId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.endpointAttachments.delete", // "parameterOrder": [ // "name" // ], // "parameters": { - // "action": { - // "description": "Approve or revoke the consumer key by setting this value to `approve` or `revoke`, respectively. The `Content-Type` header must be set to `application/octet-stream`.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "Name of the developer app key. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}`", + // "description": "Required. Name of the endpoint attachment. Use the following structure in your request: `organizations/{org}/endpointAttachments/{endpoint_attachment}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/keys/[^/]+$", + // "pattern": "^organizations/[^/]+/endpointAttachments/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" - // }, // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23456,27 +26759,24 @@ func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Do(opts ...go } -// method id "apigee.organizations.developers.apps.keys.apiproducts.delete": +// method id "apigee.organizations.endpointAttachments.get": -type OrganizationsDevelopersAppsKeysApiproductsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEndpointAttachmentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Removes an API product from an app's consumer key. After the -// API product is removed, the app cannot access the API resources -// defined in that API product. **Note**: The consumer key is not -// removed, only its association with the API product. +// Get: Gets the endpoint attachment. // -// - name: Name of the API product in the developer app key in the -// following format: -// `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{k -// ey}/apiproducts/{apiproduct}`. -func (r *OrganizationsDevelopersAppsKeysApiproductsService) Delete(name string) *OrganizationsDevelopersAppsKeysApiproductsDeleteCall { - c := &OrganizationsDevelopersAppsKeysApiproductsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the endpoint attachment. Use the following structure +// in your request: +// `organizations/{org}/endpointAttachments/{endpoint_attachment}`. +func (r *OrganizationsEndpointAttachmentsService) Get(name string) *OrganizationsEndpointAttachmentsGetCall { + c := &OrganizationsEndpointAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -23484,41 +26784,54 @@ func (r *OrganizationsDevelopersAppsKeysApiproductsService) Delete(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAppsKeysApiproductsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysApiproductsDeleteCall { +func (c *OrganizationsEndpointAttachmentsGetCall) Fields(s ...googleapi.Field) *OrganizationsEndpointAttachmentsGetCall { 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 *OrganizationsEndpointAttachmentsGetCall) IfNoneMatch(entityTag string) *OrganizationsEndpointAttachmentsGetCall { + 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 *OrganizationsDevelopersAppsKeysApiproductsDeleteCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysApiproductsDeleteCall { +func (c *OrganizationsEndpointAttachmentsGetCall) Context(ctx context.Context) *OrganizationsEndpointAttachmentsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsKeysApiproductsDeleteCall) Header() http.Header { +func (c *OrganizationsEndpointAttachmentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsKeysApiproductsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEndpointAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -23529,15 +26842,15 @@ func (c *OrganizationsDevelopersAppsKeysApiproductsDeleteCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.keys.apiproducts.delete" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperAppKey or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperAppKey.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 *OrganizationsDevelopersAppsKeysApiproductsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperAppKey, error) { +// Do executes the "apigee.organizations.endpointAttachments.get" call. +// Exactly one of *GoogleCloudApigeeV1EndpointAttachment or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudApigeeV1EndpointAttachment.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 *OrganizationsEndpointAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1EndpointAttachment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23556,7 +26869,7 @@ func (c *OrganizationsDevelopersAppsKeysApiproductsDeleteCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperAppKey{ + ret := &GoogleCloudApigeeV1EndpointAttachment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23568,25 +26881,25 @@ func (c *OrganizationsDevelopersAppsKeysApiproductsDeleteCall) Do(opts ...google } return ret, nil // { - // "description": "Removes an API product from an app's consumer key. After the API product is removed, the app cannot access the API resources defined in that API product. **Note**: The consumer key is not removed, only its association with the API product.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys/{keysId}/apiproducts/{apiproductsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.developers.apps.keys.apiproducts.delete", + // "description": "Gets the endpoint attachment.", + // "flatPath": "v1/organizations/{organizationsId}/endpointAttachments/{endpointAttachmentsId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.endpointAttachments.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Name of the API product in the developer app key in the following format: `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}/apiproducts/{apiproduct}`", + // "description": "Required. Name of the endpoint attachment. Use the following structure in your request: `organizations/{org}/endpointAttachments/{endpoint_attachment}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/keys/[^/]+/apiproducts/[^/]+$", + // "pattern": "^organizations/[^/]+/endpointAttachments/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" + // "$ref": "GoogleCloudApigeeV1EndpointAttachment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23595,98 +26908,115 @@ func (c *OrganizationsDevelopersAppsKeysApiproductsDeleteCall) Do(opts ...google } -// method id "apigee.organizations.developers.apps.keys.apiproducts.updateDeveloperAppKeyApiProduct": +// method id "apigee.organizations.endpointAttachments.list": -type OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEndpointAttachmentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateDeveloperAppKeyApiProduct: Approves or revokes the consumer key -// for an API product. After a consumer key is approved, the app can use -// it to access APIs. A consumer key that is revoked or pending cannot -// be used to access an API. Any access tokens associated with a revoked -// consumer key will remain active. However, Apigee checks the status of -// the consumer key and if set to `revoked` will not allow access to the -// API. +// List: Lists the endpoint attachments in an organization. // -// - name: Name of the API product in the developer app key in the -// following format: -// `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{k -// ey}/apiproducts/{apiproduct}`. -func (r *OrganizationsDevelopersAppsKeysApiproductsService) UpdateDeveloperAppKeyApiProduct(name string) *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall { - c := &OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the organization for which to list endpoint +// attachments. Use the following structure in your request: +// `organizations/{org}`. +func (r *OrganizationsEndpointAttachmentsService) List(parent string) *OrganizationsEndpointAttachmentsListCall { + c := &OrganizationsEndpointAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Action sets the optional parameter "action": Approve or revoke the -// consumer key by setting this value to `approve` or `revoke`, -// respectively. -func (c *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall) Action(action string) *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall { - c.urlParams_.Set("action", action) +// PageSize sets the optional parameter "pageSize": Maximum number of +// endpoint attachments to return. If unspecified, at most 25 +// attachments will be returned. +func (c *OrganizationsEndpointAttachmentsListCall) PageSize(pageSize int64) *OrganizationsEndpointAttachmentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token, +// returned from a previous `ListEndpointAttachments` call, that you can +// use to retrieve the next page. +func (c *OrganizationsEndpointAttachmentsListCall) PageToken(pageToken string) *OrganizationsEndpointAttachmentsListCall { + 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 *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall { +func (c *OrganizationsEndpointAttachmentsListCall) Fields(s ...googleapi.Field) *OrganizationsEndpointAttachmentsListCall { 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 *OrganizationsEndpointAttachmentsListCall) IfNoneMatch(entityTag string) *OrganizationsEndpointAttachmentsListCall { + 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 *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall { +func (c *OrganizationsEndpointAttachmentsListCall) Context(ctx context.Context) *OrganizationsEndpointAttachmentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall) Header() http.Header { +func (c *OrganizationsEndpointAttachmentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEndpointAttachmentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpointAttachments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.keys.apiproducts.updateDeveloperAppKeyApiProduct" 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 *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProductCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "apigee.organizations.endpointAttachments.list" call. +// Exactly one of *GoogleCloudApigeeV1ListEndpointAttachmentsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListEndpointAttachmentsResponse.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 *OrganizationsEndpointAttachmentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListEndpointAttachmentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23705,7 +27035,7 @@ func (c *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProdu if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudApigeeV1ListEndpointAttachmentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23717,30 +27047,36 @@ func (c *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProdu } return ret, nil // { - // "description": "Approves or revokes the consumer key for an API product. After a consumer key is approved, the app can use it to access APIs. A consumer key that is revoked or pending cannot be used to access an API. Any access tokens associated with a revoked consumer key will remain active. However, Apigee checks the status of the consumer key and if set to `revoked` will not allow access to the API.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys/{keysId}/apiproducts/{apiproductsId}", - // "httpMethod": "POST", - // "id": "apigee.organizations.developers.apps.keys.apiproducts.updateDeveloperAppKeyApiProduct", + // "description": "Lists the endpoint attachments in an organization.", + // "flatPath": "v1/organizations/{organizationsId}/endpointAttachments", + // "httpMethod": "GET", + // "id": "apigee.organizations.endpointAttachments.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "action": { - // "description": "Approve or revoke the consumer key by setting this value to `approve` or `revoke`, respectively.", + // "pageSize": { + // "description": "Optional. Maximum number of endpoint attachments to return. If unspecified, at most 25 attachments will be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token, returned from a previous `ListEndpointAttachments` call, that you can use to retrieve the next page.", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "Name of the API product in the developer app key in the following format: `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}/apiproducts/{apiproduct}`", + // "parent": { + // "description": "Required. Name of the organization for which to list endpoint attachments. Use the following structure in your request: `organizations/{org}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+/keys/[^/]+/apiproducts/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/endpointAttachments", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudApigeeV1ListEndpointAttachmentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23749,44 +27085,60 @@ func (c *OrganizationsDevelopersAppsKeysApiproductsUpdateDeveloperAppKeyApiProdu } -// method id "apigee.organizations.developers.apps.keys.create.create": +// 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 *OrganizationsEndpointAttachmentsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListEndpointAttachmentsResponse) 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) + } +} -type OrganizationsDevelopersAppsKeysCreateCreateCall struct { - s *Service - parent string - googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "apigee.organizations.envgroups.create": + +type OrganizationsEnvgroupsCreateCall struct { + s *Service + parent string + googlecloudapigeev1environmentgroup *GoogleCloudApigeeV1EnvironmentGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a custom consumer key and secret for a developer app. -// This is particularly useful if you want to migrate existing consumer -// keys and secrets to Apigee from another system. Consumer keys and -// secrets can contain letters, numbers, underscores, and hyphens. No -// other special characters are allowed. To avoid service disruptions, a -// consumer key and secret should not exceed 2 KBs each. **Note**: When -// creating the consumer key and secret, an association to API products -// will not be made. Therefore, you should not specify the associated -// API products in your request. Instead, use the UpdateDeveloperAppKey -// API to make the association after the consumer key and secret are -// created. If a consumer key and secret already exist, you can keep -// them or delete them using the DeleteDeveloperAppKey API. +// Create: Creates a new environment group. // -// - parent: Parent of the developer app key. Use the following -// structure in your request: -// `organizations/{org}/developers/{developer_email}/apps`. -func (r *OrganizationsDevelopersAppsKeysCreateService) Create(parent string, googlecloudapigeev1developerappkey *GoogleCloudApigeeV1DeveloperAppKey) *OrganizationsDevelopersAppsKeysCreateCreateCall { - c := &OrganizationsDevelopersAppsKeysCreateCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the organization in which to create the environment +// group in the following format: `organizations/{org}`. +func (r *OrganizationsEnvgroupsService) Create(parent string, googlecloudapigeev1environmentgroup *GoogleCloudApigeeV1EnvironmentGroup) *OrganizationsEnvgroupsCreateCall { + c := &OrganizationsEnvgroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1developerappkey = googlecloudapigeev1developerappkey + c.googlecloudapigeev1environmentgroup = googlecloudapigeev1environmentgroup + return c +} + +// Name sets the optional parameter "name": ID of the environment group. +// Overrides any ID in the environment_group resource. +func (c *OrganizationsEnvgroupsCreateCall) Name(name string) *OrganizationsEnvgroupsCreateCall { + c.urlParams_.Set("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 *OrganizationsDevelopersAppsKeysCreateCreateCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAppsKeysCreateCreateCall { +func (c *OrganizationsEnvgroupsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23794,21 +27146,21 @@ func (c *OrganizationsDevelopersAppsKeysCreateCreateCall) Fields(s ...googleapi. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAppsKeysCreateCreateCall) Context(ctx context.Context) *OrganizationsDevelopersAppsKeysCreateCreateCall { +func (c *OrganizationsEnvgroupsCreateCall) Context(ctx context.Context) *OrganizationsEnvgroupsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAppsKeysCreateCreateCall) Header() http.Header { +func (c *OrganizationsEnvgroupsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAppsKeysCreateCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvgroupsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23816,14 +27168,14 @@ func (c *OrganizationsDevelopersAppsKeysCreateCreateCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1developerappkey) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1environmentgroup) 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, "v1/{+parent}/keys/create") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/envgroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23836,15 +27188,14 @@ func (c *OrganizationsDevelopersAppsKeysCreateCreateCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.apps.keys.create.create" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperAppKey or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperAppKey.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 *OrganizationsDevelopersAppsKeysCreateCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperAppKey, error) { +// Do executes the "apigee.organizations.envgroups.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 *OrganizationsEnvgroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23863,7 +27214,7 @@ func (c *OrganizationsDevelopersAppsKeysCreateCreateCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperAppKey{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23875,28 +27226,33 @@ func (c *OrganizationsDevelopersAppsKeysCreateCreateCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Creates a custom consumer key and secret for a developer app. This is particularly useful if you want to migrate existing consumer keys and secrets to Apigee from another system. Consumer keys and secrets can contain letters, numbers, underscores, and hyphens. No other special characters are allowed. To avoid service disruptions, a consumer key and secret should not exceed 2 KBs each. **Note**: When creating the consumer key and secret, an association to API products will not be made. Therefore, you should not specify the associated API products in your request. Instead, use the UpdateDeveloperAppKey API to make the association after the consumer key and secret are created. If a consumer key and secret already exist, you can keep them or delete them using the DeleteDeveloperAppKey API.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/apps/{appsId}/keys/create", + // "description": "Creates a new environment group.", + // "flatPath": "v1/organizations/{organizationsId}/envgroups", // "httpMethod": "POST", - // "id": "apigee.organizations.developers.apps.keys.create.create", + // "id": "apigee.organizations.envgroups.create", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "name": { + // "description": "ID of the environment group. Overrides any ID in the environment_group resource.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Parent of the developer app key. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/apps`", + // "description": "Required. Name of the organization in which to create the environment group in the following format: `organizations/{org}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/apps/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/keys/create", + // "path": "v1/{+parent}/envgroups", // "request": { - // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" + // "$ref": "GoogleCloudApigeeV1EnvironmentGroup" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperAppKey" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23905,9 +27261,9 @@ func (c *OrganizationsDevelopersAppsKeysCreateCreateCall) Do(opts ...googleapi.C } -// method id "apigee.organizations.developers.attributes.delete": +// method id "apigee.organizations.envgroups.delete": -type OrganizationsDevelopersAttributesDeleteCall struct { +type OrganizationsEnvgroupsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -23915,14 +27271,12 @@ type OrganizationsDevelopersAttributesDeleteCall struct { header_ http.Header } -// Delete: Deletes a developer attribute. +// Delete: Deletes an environment group. // -// - name: Name of the developer attribute. Use the following structure -// in your request: -// `organizations/{org}/developers/{developer_email}/attributes/{attrib -// ute}`. -func (r *OrganizationsDevelopersAttributesService) Delete(name string) *OrganizationsDevelopersAttributesDeleteCall { - c := &OrganizationsDevelopersAttributesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the environment group in the following format: +// `organizations/{org}/envgroups/{envgroup}`. +func (r *OrganizationsEnvgroupsService) Delete(name string) *OrganizationsEnvgroupsDeleteCall { + c := &OrganizationsEnvgroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -23930,7 +27284,7 @@ func (r *OrganizationsDevelopersAttributesService) Delete(name string) *Organiza // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAttributesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAttributesDeleteCall { +func (c *OrganizationsEnvgroupsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23938,21 +27292,21 @@ func (c *OrganizationsDevelopersAttributesDeleteCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAttributesDeleteCall) Context(ctx context.Context) *OrganizationsDevelopersAttributesDeleteCall { +func (c *OrganizationsEnvgroupsDeleteCall) Context(ctx context.Context) *OrganizationsEnvgroupsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAttributesDeleteCall) Header() http.Header { +func (c *OrganizationsEnvgroupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAttributesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvgroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23975,14 +27329,14 @@ func (c *OrganizationsDevelopersAttributesDeleteCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.attributes.delete" call. -// Exactly one of *GoogleCloudApigeeV1Attribute or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Attribute.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.envgroups.delete" 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 *OrganizationsDevelopersAttributesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { +func (c *OrganizationsEnvgroupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24001,7 +27355,7 @@ func (c *OrganizationsDevelopersAttributesDeleteCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Attribute{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24013,25 +27367,25 @@ func (c *OrganizationsDevelopersAttributesDeleteCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Deletes a developer attribute.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/attributes/{attributesId}", + // "description": "Deletes an environment group.", + // "flatPath": "v1/organizations/{organizationsId}/envgroups/{envgroupsId}", // "httpMethod": "DELETE", - // "id": "apigee.organizations.developers.attributes.delete", + // "id": "apigee.organizations.envgroups.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the developer attribute. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/attributes/{attribute}`", + // "description": "Required. Name of the environment group in the following format: `organizations/{org}/envgroups/{envgroup}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/attributes/[^/]+$", + // "pattern": "^organizations/[^/]+/envgroups/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Attribute" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24040,9 +27394,9 @@ func (c *OrganizationsDevelopersAttributesDeleteCall) Do(opts ...googleapi.CallO } -// method id "apigee.organizations.developers.attributes.get": +// method id "apigee.organizations.envgroups.get": -type OrganizationsDevelopersAttributesGetCall struct { +type OrganizationsEnvgroupsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -24051,14 +27405,12 @@ type OrganizationsDevelopersAttributesGetCall struct { header_ http.Header } -// Get: Returns the value of the specified developer attribute. +// Get: Gets an environment group. // -// - name: Name of the developer attribute. Use the following structure -// in your request: -// `organizations/{org}/developers/{developer_email}/attributes/{attrib -// ute}`. -func (r *OrganizationsDevelopersAttributesService) Get(name string) *OrganizationsDevelopersAttributesGetCall { - c := &OrganizationsDevelopersAttributesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the environment group in the following format: +// `organizations/{org}/envgroups/{envgroup}`. +func (r *OrganizationsEnvgroupsService) Get(name string) *OrganizationsEnvgroupsGetCall { + c := &OrganizationsEnvgroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -24066,7 +27418,7 @@ func (r *OrganizationsDevelopersAttributesService) Get(name string) *Organizatio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersAttributesGetCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAttributesGetCall { +func (c *OrganizationsEnvgroupsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24076,7 +27428,7 @@ func (c *OrganizationsDevelopersAttributesGetCall) Fields(s ...googleapi.Field) // 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 *OrganizationsDevelopersAttributesGetCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersAttributesGetCall { +func (c *OrganizationsEnvgroupsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvgroupsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -24084,21 +27436,21 @@ func (c *OrganizationsDevelopersAttributesGetCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAttributesGetCall) Context(ctx context.Context) *OrganizationsDevelopersAttributesGetCall { +func (c *OrganizationsEnvgroupsGetCall) Context(ctx context.Context) *OrganizationsEnvgroupsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAttributesGetCall) Header() http.Header { +func (c *OrganizationsEnvgroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAttributesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvgroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24124,14 +27476,15 @@ func (c *OrganizationsDevelopersAttributesGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.attributes.get" call. -// Exactly one of *GoogleCloudApigeeV1Attribute or error will be +// Do executes the "apigee.organizations.envgroups.get" call. +// Exactly one of *GoogleCloudApigeeV1EnvironmentGroup or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Attribute.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 *OrganizationsDevelopersAttributesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { +// either *GoogleCloudApigeeV1EnvironmentGroup.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 *OrganizationsEnvgroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1EnvironmentGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24150,7 +27503,7 @@ func (c *OrganizationsDevelopersAttributesGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Attribute{ + ret := &GoogleCloudApigeeV1EnvironmentGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24162,25 +27515,25 @@ func (c *OrganizationsDevelopersAttributesGetCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Returns the value of the specified developer attribute.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/attributes/{attributesId}", + // "description": "Gets an environment group.", + // "flatPath": "v1/organizations/{organizationsId}/envgroups/{envgroupsId}", // "httpMethod": "GET", - // "id": "apigee.organizations.developers.attributes.get", + // "id": "apigee.organizations.envgroups.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the developer attribute. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/attributes/{attribute}`", + // "description": "Required. Name of the environment group in the following format: `organizations/{org}/envgroups/{envgroup}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/attributes/[^/]+$", + // "pattern": "^organizations/[^/]+/envgroups/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Attribute" + // "$ref": "GoogleCloudApigeeV1EnvironmentGroup" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24189,9 +27542,9 @@ func (c *OrganizationsDevelopersAttributesGetCall) Do(opts ...googleapi.CallOpti } -// method id "apigee.organizations.developers.attributes.list": +// method id "apigee.organizations.envgroups.list": -type OrganizationsDevelopersAttributesListCall struct { +type OrganizationsEnvgroupsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -24200,21 +27553,35 @@ type OrganizationsDevelopersAttributesListCall struct { header_ http.Header } -// List: Returns a list of all developer attributes. +// List: Lists all environment groups. // -// - parent: Email address of the developer for which attributes are -// being listed. Use the following structure in your request: -// `organizations/{org}/developers/{developer_email}`. -func (r *OrganizationsDevelopersAttributesService) List(parent string) *OrganizationsDevelopersAttributesListCall { - c := &OrganizationsDevelopersAttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the organization for which to list environment +// groups in the following format: `organizations/{org}`. +func (r *OrganizationsEnvgroupsService) List(parent string) *OrganizationsEnvgroupsListCall { + c := &OrganizationsEnvgroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } +// PageSize sets the optional parameter "pageSize": Maximum number of +// environment groups to return. The page size defaults to 25. +func (c *OrganizationsEnvgroupsListCall) PageSize(pageSize int64) *OrganizationsEnvgroupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token, +// returned from a previous ListEnvironmentGroups call, that you can use +// to retrieve the next page. +func (c *OrganizationsEnvgroupsListCall) PageToken(pageToken string) *OrganizationsEnvgroupsListCall { + 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 *OrganizationsDevelopersAttributesListCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAttributesListCall { +func (c *OrganizationsEnvgroupsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24224,7 +27591,7 @@ func (c *OrganizationsDevelopersAttributesListCall) Fields(s ...googleapi.Field) // 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 *OrganizationsDevelopersAttributesListCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersAttributesListCall { +func (c *OrganizationsEnvgroupsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvgroupsListCall { c.ifNoneMatch_ = entityTag return c } @@ -24232,21 +27599,21 @@ func (c *OrganizationsDevelopersAttributesListCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAttributesListCall) Context(ctx context.Context) *OrganizationsDevelopersAttributesListCall { +func (c *OrganizationsEnvgroupsListCall) Context(ctx context.Context) *OrganizationsEnvgroupsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAttributesListCall) Header() http.Header { +func (c *OrganizationsEnvgroupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAttributesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvgroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24259,7 +27626,7 @@ func (c *OrganizationsDevelopersAttributesListCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/envgroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24272,14 +27639,16 @@ func (c *OrganizationsDevelopersAttributesListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.attributes.list" call. -// Exactly one of *GoogleCloudApigeeV1Attributes or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Attributes.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 *OrganizationsDevelopersAttributesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attributes, error) { +// Do executes the "apigee.organizations.envgroups.list" call. +// Exactly one of *GoogleCloudApigeeV1ListEnvironmentGroupsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListEnvironmentGroupsResponse.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 *OrganizationsEnvgroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListEnvironmentGroupsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24298,7 +27667,7 @@ func (c *OrganizationsDevelopersAttributesListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Attributes{ + ret := &GoogleCloudApigeeV1ListEnvironmentGroupsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24310,25 +27679,36 @@ func (c *OrganizationsDevelopersAttributesListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Returns a list of all developer attributes.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/attributes", + // "description": "Lists all environment groups.", + // "flatPath": "v1/organizations/{organizationsId}/envgroups", // "httpMethod": "GET", - // "id": "apigee.organizations.developers.attributes.list", + // "id": "apigee.organizations.envgroups.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "pageSize": { + // "description": "Maximum number of environment groups to return. The page size defaults to 25.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token, returned from a previous ListEnvironmentGroups call, that you can use to retrieve the next page.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. Email address of the developer for which attributes are being listed. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", + // "description": "Required. Name of the organization for which to list environment groups in the following format: `organizations/{org}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/attributes", + // "path": "v1/{+parent}/envgroups", // "response": { - // "$ref": "GoogleCloudApigeeV1Attributes" + // "$ref": "GoogleCloudApigeeV1ListEnvironmentGroupsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24337,40 +27717,60 @@ func (c *OrganizationsDevelopersAttributesListCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.developers.attributes.updateDeveloperAttribute": +// 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 *OrganizationsEnvgroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListEnvironmentGroupsResponse) 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) + } +} -type OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall struct { - s *Service - name string - googlecloudapigeev1attribute *GoogleCloudApigeeV1Attribute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "apigee.organizations.envgroups.patch": + +type OrganizationsEnvgroupsPatchCall struct { + s *Service + name string + googlecloudapigeev1environmentgroup *GoogleCloudApigeeV1EnvironmentGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateDeveloperAttribute: Updates a developer attribute. **Note**: -// OAuth access tokens and Key Management Service (KMS) entities (apps, -// developers, and API products) are cached for 180 seconds (default). -// Any custom attributes associated with these entities are cached for -// at least 180 seconds after the entity is accessed at runtime. -// Therefore, an `ExpiresIn` element on the OAuthV2 policy won't be able -// to expire an access token in less than 180 seconds. +// Patch: Updates an environment group. // -// - name: Name of the developer attribute. Use the following structure -// in your request: -// `organizations/{org}/developers/{developer_email}/attributes/{attrib -// ute}`. -func (r *OrganizationsDevelopersAttributesService) UpdateDeveloperAttribute(name string, googlecloudapigeev1attribute *GoogleCloudApigeeV1Attribute) *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall { - c := &OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the environment group to update in the format: +// `organizations/{org}/envgroups/{envgroup}. +func (r *OrganizationsEnvgroupsService) Patch(name string, googlecloudapigeev1environmentgroup *GoogleCloudApigeeV1EnvironmentGroup) *OrganizationsEnvgroupsPatchCall { + c := &OrganizationsEnvgroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1attribute = googlecloudapigeev1attribute + c.googlecloudapigeev1environmentgroup = googlecloudapigeev1environmentgroup + return c +} + +// UpdateMask sets the optional parameter "updateMask": List of fields +// to be updated. +func (c *OrganizationsEnvgroupsPatchCall) UpdateMask(updateMask string) *OrganizationsEnvgroupsPatchCall { + 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 *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall { +func (c *OrganizationsEnvgroupsPatchCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24378,21 +27778,21 @@ func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) Fields(s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) Context(ctx context.Context) *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall { +func (c *OrganizationsEnvgroupsPatchCall) Context(ctx context.Context) *OrganizationsEnvgroupsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) Header() http.Header { +func (c *OrganizationsEnvgroupsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvgroupsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24400,7 +27800,7 @@ func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) doReques } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1attribute) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1environmentgroup) if err != nil { return nil, err } @@ -24409,7 +27809,7 @@ func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) doReques c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -24420,14 +27820,14 @@ func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.attributes.updateDeveloperAttribute" call. -// Exactly one of *GoogleCloudApigeeV1Attribute or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Attribute.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.envgroups.patch" 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 *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Attribute, error) { +func (c *OrganizationsEnvgroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24446,7 +27846,7 @@ func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Attribute{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24458,28 +27858,34 @@ func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) Do(opts } return ret, nil // { - // "description": "Updates a developer attribute. **Note**: OAuth access tokens and Key Management Service (KMS) entities (apps, developers, and API products) are cached for 180 seconds (default). Any custom attributes associated with these entities are cached for at least 180 seconds after the entity is accessed at runtime. Therefore, an `ExpiresIn` element on the OAuthV2 policy won't be able to expire an access token in less than 180 seconds.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/attributes/{attributesId}", - // "httpMethod": "POST", - // "id": "apigee.organizations.developers.attributes.updateDeveloperAttribute", + // "description": "Updates an environment group.", + // "flatPath": "v1/organizations/{organizationsId}/envgroups/{envgroupsId}", + // "httpMethod": "PATCH", + // "id": "apigee.organizations.envgroups.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the developer attribute. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/attributes/{attribute}`", + // "description": "Required. Name of the environment group to update in the format: `organizations/{org}/envgroups/{envgroup}.", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/attributes/[^/]+$", + // "pattern": "^organizations/[^/]+/envgroups/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "List of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudApigeeV1Attribute" + // "$ref": "GoogleCloudApigeeV1EnvironmentGroup" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Attribute" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24488,35 +27894,33 @@ func (c *OrganizationsDevelopersAttributesUpdateDeveloperAttributeCall) Do(opts } -// method id "apigee.organizations.developers.balance.adjust": +// method id "apigee.organizations.envgroups.attachments.create": -type OrganizationsDevelopersBalanceAdjustCall struct { - s *Service - name string - googlecloudapigeev1adjustdeveloperbalancerequest *GoogleCloudApigeeV1AdjustDeveloperBalanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvgroupsAttachmentsCreateCall struct { + s *Service + parent string + googlecloudapigeev1environmentgroupattachment *GoogleCloudApigeeV1EnvironmentGroupAttachment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Adjust: Adjust the prepaid balance for the developer. This API will -// be used in scenarios where the developer has been under-charged or -// over-charged. +// Create: Creates a new attachment of an environment to an environment +// group. // -// - name: Account balance for the developer. Use the following -// structure in your request: -// `organizations/{org}/developers/{developer}/balance`. -func (r *OrganizationsDevelopersBalanceService) Adjust(name string, googlecloudapigeev1adjustdeveloperbalancerequest *GoogleCloudApigeeV1AdjustDeveloperBalanceRequest) *OrganizationsDevelopersBalanceAdjustCall { - c := &OrganizationsDevelopersBalanceAdjustCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1adjustdeveloperbalancerequest = googlecloudapigeev1adjustdeveloperbalancerequest +// - parent: EnvironmentGroup under which to create the attachment in +// the following format: `organizations/{org}/envgroups/{envgroup}`. +func (r *OrganizationsEnvgroupsAttachmentsService) Create(parent string, googlecloudapigeev1environmentgroupattachment *GoogleCloudApigeeV1EnvironmentGroupAttachment) *OrganizationsEnvgroupsAttachmentsCreateCall { + c := &OrganizationsEnvgroupsAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1environmentgroupattachment = googlecloudapigeev1environmentgroupattachment return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersBalanceAdjustCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersBalanceAdjustCall { +func (c *OrganizationsEnvgroupsAttachmentsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsAttachmentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24524,21 +27928,21 @@ func (c *OrganizationsDevelopersBalanceAdjustCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersBalanceAdjustCall) Context(ctx context.Context) *OrganizationsDevelopersBalanceAdjustCall { +func (c *OrganizationsEnvgroupsAttachmentsCreateCall) Context(ctx context.Context) *OrganizationsEnvgroupsAttachmentsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersBalanceAdjustCall) Header() http.Header { +func (c *OrganizationsEnvgroupsAttachmentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersBalanceAdjustCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvgroupsAttachmentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24546,14 +27950,14 @@ func (c *OrganizationsDevelopersBalanceAdjustCall) doRequest(alt string) (*http. } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1adjustdeveloperbalancerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1environmentgroupattachment) 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, "v1/{+name}:adjust") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attachments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -24561,20 +27965,19 @@ func (c *OrganizationsDevelopersBalanceAdjustCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.balance.adjust" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperBalance or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperBalance.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 *OrganizationsDevelopersBalanceAdjustCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperBalance, error) { +// Do executes the "apigee.organizations.envgroups.attachments.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 *OrganizationsEnvgroupsAttachmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24593,7 +27996,7 @@ func (c *OrganizationsDevelopersBalanceAdjustCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperBalance{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24605,28 +28008,28 @@ func (c *OrganizationsDevelopersBalanceAdjustCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Adjust the prepaid balance for the developer. This API will be used in scenarios where the developer has been under-charged or over-charged.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/balance:adjust", + // "description": "Creates a new attachment of an environment to an environment group.", + // "flatPath": "v1/organizations/{organizationsId}/envgroups/{envgroupsId}/attachments", // "httpMethod": "POST", - // "id": "apigee.organizations.developers.balance.adjust", + // "id": "apigee.organizations.envgroups.attachments.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Account balance for the developer. Use the following structure in your request: `organizations/{org}/developers/{developer}/balance`", + // "parent": { + // "description": "Required. EnvironmentGroup under which to create the attachment in the following format: `organizations/{org}/envgroups/{envgroup}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/balance$", + // "pattern": "^organizations/[^/]+/envgroups/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:adjust", + // "path": "v1/{+parent}/attachments", // "request": { - // "$ref": "GoogleCloudApigeeV1AdjustDeveloperBalanceRequest" + // "$ref": "GoogleCloudApigeeV1EnvironmentGroupAttachment" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperBalance" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24635,33 +28038,31 @@ func (c *OrganizationsDevelopersBalanceAdjustCall) Do(opts ...googleapi.CallOpti } -// method id "apigee.organizations.developers.balance.credit": +// method id "apigee.organizations.envgroups.attachments.delete": -type OrganizationsDevelopersBalanceCreditCall struct { - s *Service - name string - googlecloudapigeev1creditdeveloperbalancerequest *GoogleCloudApigeeV1CreditDeveloperBalanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvgroupsAttachmentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Credit: Credits the account balance for the developer. +// Delete: Deletes an environment group attachment. // -// - name: Account balance for the developer. Use the following -// structure in your request: -// `organizations/{org}/developers/{developer}/balance`. -func (r *OrganizationsDevelopersBalanceService) Credit(name string, googlecloudapigeev1creditdeveloperbalancerequest *GoogleCloudApigeeV1CreditDeveloperBalanceRequest) *OrganizationsDevelopersBalanceCreditCall { - c := &OrganizationsDevelopersBalanceCreditCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the environment group attachment to delete in the +// following format: +// `organizations/{org}/envgroups/{envgroup}/attachments/{attachment}`. +func (r *OrganizationsEnvgroupsAttachmentsService) Delete(name string) *OrganizationsEnvgroupsAttachmentsDeleteCall { + c := &OrganizationsEnvgroupsAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1creditdeveloperbalancerequest = googlecloudapigeev1creditdeveloperbalancerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDevelopersBalanceCreditCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersBalanceCreditCall { +func (c *OrganizationsEnvgroupsAttachmentsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsAttachmentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24669,21 +28070,21 @@ func (c *OrganizationsDevelopersBalanceCreditCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDevelopersBalanceCreditCall) Context(ctx context.Context) *OrganizationsDevelopersBalanceCreditCall { +func (c *OrganizationsEnvgroupsAttachmentsDeleteCall) Context(ctx context.Context) *OrganizationsEnvgroupsAttachmentsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersBalanceCreditCall) Header() http.Header { +func (c *OrganizationsEnvgroupsAttachmentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersBalanceCreditCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvgroupsAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24691,16 +28092,11 @@ func (c *OrganizationsDevelopersBalanceCreditCall) doRequest(alt string) (*http. } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1creditdeveloperbalancerequest) - 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, "v1/{+name}:credit") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -24711,15 +28107,14 @@ func (c *OrganizationsDevelopersBalanceCreditCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.balance.credit" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperBalance or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DeveloperBalance.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 *OrganizationsDevelopersBalanceCreditCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperBalance, error) { +// Do executes the "apigee.organizations.envgroups.attachments.delete" 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 *OrganizationsEnvgroupsAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24738,7 +28133,7 @@ func (c *OrganizationsDevelopersBalanceCreditCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperBalance{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24750,28 +28145,25 @@ func (c *OrganizationsDevelopersBalanceCreditCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Credits the account balance for the developer.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/balance:credit", - // "httpMethod": "POST", - // "id": "apigee.organizations.developers.balance.credit", + // "description": "Deletes an environment group attachment.", + // "flatPath": "v1/organizations/{organizationsId}/envgroups/{envgroupsId}/attachments/{attachmentsId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.envgroups.attachments.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Account balance for the developer. Use the following structure in your request: `organizations/{org}/developers/{developer}/balance`", + // "description": "Required. Name of the environment group attachment to delete in the following format: `organizations/{org}/envgroups/{envgroup}/attachments/{attachment}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/balance$", + // "pattern": "^organizations/[^/]+/envgroups/[^/]+/attachments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:credit", - // "request": { - // "$ref": "GoogleCloudApigeeV1CreditDeveloperBalanceRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperBalance" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24780,92 +28172,99 @@ func (c *OrganizationsDevelopersBalanceCreditCall) Do(opts ...googleapi.CallOpti } -// method id "apigee.organizations.developers.subscriptions.create": +// method id "apigee.organizations.envgroups.attachments.get": -type OrganizationsDevelopersSubscriptionsCreateCall struct { - s *Service - parent string - googlecloudapigeev1developersubscription *GoogleCloudApigeeV1DeveloperSubscription - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvgroupsAttachmentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a subscription to an API product. +// Get: Gets an environment group attachment. // -// - parent: Email address of the developer that is purchasing a -// subscription to the API product. Use the following structure in -// your request: `organizations/{org}/developers/{developer_email}`. -func (r *OrganizationsDevelopersSubscriptionsService) Create(parent string, googlecloudapigeev1developersubscription *GoogleCloudApigeeV1DeveloperSubscription) *OrganizationsDevelopersSubscriptionsCreateCall { - c := &OrganizationsDevelopersSubscriptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1developersubscription = googlecloudapigeev1developersubscription +// - name: Name of the environment group attachment in the following +// format: +// `organizations/{org}/envgroups/{envgroup}/attachments/{attachment}`. +func (r *OrganizationsEnvgroupsAttachmentsService) Get(name string) *OrganizationsEnvgroupsAttachmentsGetCall { + c := &OrganizationsEnvgroupsAttachmentsGetCall{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 *OrganizationsDevelopersSubscriptionsCreateCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersSubscriptionsCreateCall { +func (c *OrganizationsEnvgroupsAttachmentsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsAttachmentsGetCall { 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 *OrganizationsEnvgroupsAttachmentsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvgroupsAttachmentsGetCall { + 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 *OrganizationsDevelopersSubscriptionsCreateCall) Context(ctx context.Context) *OrganizationsDevelopersSubscriptionsCreateCall { +func (c *OrganizationsEnvgroupsAttachmentsGetCall) Context(ctx context.Context) *OrganizationsEnvgroupsAttachmentsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersSubscriptionsCreateCall) Header() http.Header { +func (c *OrganizationsEnvgroupsAttachmentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersSubscriptionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvgroupsAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1developersubscription) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/subscriptions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.subscriptions.create" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperSubscription or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "apigee.organizations.envgroups.attachments.get" call. +// Exactly one of *GoogleCloudApigeeV1EnvironmentGroupAttachment or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudApigeeV1DeveloperSubscription.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudApigeeV1EnvironmentGroupAttachment.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 *OrganizationsDevelopersSubscriptionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperSubscription, error) { +func (c *OrganizationsEnvgroupsAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1EnvironmentGroupAttachment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24884,7 +28283,7 @@ func (c *OrganizationsDevelopersSubscriptionsCreateCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperSubscription{ + ret := &GoogleCloudApigeeV1EnvironmentGroupAttachment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24896,28 +28295,25 @@ func (c *OrganizationsDevelopersSubscriptionsCreateCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Creates a subscription to an API product. ", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/subscriptions", - // "httpMethod": "POST", - // "id": "apigee.organizations.developers.subscriptions.create", + // "description": "Gets an environment group attachment.", + // "flatPath": "v1/organizations/{organizationsId}/envgroups/{envgroupsId}/attachments/{attachmentsId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.envgroups.attachments.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Email address of the developer that is purchasing a subscription to the API product. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", + // "name": { + // "description": "Required. Name of the environment group attachment in the following format: `organizations/{org}/envgroups/{envgroup}/attachments/{attachment}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+$", + // "pattern": "^organizations/[^/]+/envgroups/[^/]+/attachments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/subscriptions", - // "request": { - // "$ref": "GoogleCloudApigeeV1DeveloperSubscription" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperSubscription" + // "$ref": "GoogleCloudApigeeV1EnvironmentGroupAttachment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24926,93 +28322,115 @@ func (c *OrganizationsDevelopersSubscriptionsCreateCall) Do(opts ...googleapi.Ca } -// method id "apigee.organizations.developers.subscriptions.expire": +// method id "apigee.organizations.envgroups.attachments.list": -type OrganizationsDevelopersSubscriptionsExpireCall struct { - s *Service - name string - googlecloudapigeev1expiredevelopersubscriptionrequest *GoogleCloudApigeeV1ExpireDeveloperSubscriptionRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvgroupsAttachmentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Expire: Expires an API product subscription immediately. +// List: Lists all attachments of an environment group. // -// - name: Name of the API product subscription. Use the following -// structure in your request: -// `organizations/{org}/developers/{developer_email}/subscriptions/{sub -// scription}`. -func (r *OrganizationsDevelopersSubscriptionsService) Expire(name string, googlecloudapigeev1expiredevelopersubscriptionrequest *GoogleCloudApigeeV1ExpireDeveloperSubscriptionRequest) *OrganizationsDevelopersSubscriptionsExpireCall { - c := &OrganizationsDevelopersSubscriptionsExpireCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1expiredevelopersubscriptionrequest = googlecloudapigeev1expiredevelopersubscriptionrequest +// - parent: Name of the environment group in the following format: +// `organizations/{org}/envgroups/{envgroup}`. +func (r *OrganizationsEnvgroupsAttachmentsService) List(parent string) *OrganizationsEnvgroupsAttachmentsListCall { + c := &OrganizationsEnvgroupsAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// environment group attachments to return. The page size defaults to +// 25. +func (c *OrganizationsEnvgroupsAttachmentsListCall) PageSize(pageSize int64) *OrganizationsEnvgroupsAttachmentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token, +// returned by a previous ListEnvironmentGroupAttachments call, that you +// can use to retrieve the next page. +func (c *OrganizationsEnvgroupsAttachmentsListCall) PageToken(pageToken string) *OrganizationsEnvgroupsAttachmentsListCall { + 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 *OrganizationsDevelopersSubscriptionsExpireCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersSubscriptionsExpireCall { +func (c *OrganizationsEnvgroupsAttachmentsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsAttachmentsListCall { 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 *OrganizationsEnvgroupsAttachmentsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvgroupsAttachmentsListCall { + 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 *OrganizationsDevelopersSubscriptionsExpireCall) Context(ctx context.Context) *OrganizationsDevelopersSubscriptionsExpireCall { +func (c *OrganizationsEnvgroupsAttachmentsListCall) Context(ctx context.Context) *OrganizationsEnvgroupsAttachmentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersSubscriptionsExpireCall) Header() http.Header { +func (c *OrganizationsEnvgroupsAttachmentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersSubscriptionsExpireCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvgroupsAttachmentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1expiredevelopersubscriptionrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:expire") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attachments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.subscriptions.expire" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperSubscription or error +// Do executes the "apigee.organizations.envgroups.attachments.list" call. +// Exactly one of +// *GoogleCloudApigeeV1ListEnvironmentGroupAttachmentsResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudApigeeV1DeveloperSubscription.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudApigeeV1ListEnvironmentGroupAttachmentsResponse.ServerResp +// onse.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 *OrganizationsDevelopersSubscriptionsExpireCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperSubscription, error) { +func (c *OrganizationsEnvgroupsAttachmentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListEnvironmentGroupAttachmentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25031,7 +28449,7 @@ func (c *OrganizationsDevelopersSubscriptionsExpireCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperSubscription{ + ret := &GoogleCloudApigeeV1ListEnvironmentGroupAttachmentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25043,28 +28461,36 @@ func (c *OrganizationsDevelopersSubscriptionsExpireCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Expires an API product subscription immediately.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/subscriptions/{subscriptionsId}:expire", - // "httpMethod": "POST", - // "id": "apigee.organizations.developers.subscriptions.expire", + // "description": "Lists all attachments of an environment group.", + // "flatPath": "v1/organizations/{organizationsId}/envgroups/{envgroupsId}/attachments", + // "httpMethod": "GET", + // "id": "apigee.organizations.envgroups.attachments.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the API product subscription. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/subscriptions/{subscription}`", + // "pageSize": { + // "description": "Maximum number of environment group attachments to return. The page size defaults to 25.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token, returned by a previous ListEnvironmentGroupAttachments call, that you can use to retrieve the next page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of the environment group in the following format: `organizations/{org}/envgroups/{envgroup}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/subscriptions/[^/]+$", + // "pattern": "^organizations/[^/]+/envgroups/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:expire", - // "request": { - // "$ref": "GoogleCloudApigeeV1ExpireDeveloperSubscriptionRequest" - // }, + // "path": "v1/{+parent}/attachments", // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperSubscription" + // "$ref": "GoogleCloudApigeeV1ListEnvironmentGroupAttachmentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25073,100 +28499,119 @@ func (c *OrganizationsDevelopersSubscriptionsExpireCall) Do(opts ...googleapi.Ca } -// method id "apigee.organizations.developers.subscriptions.get": +// 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 *OrganizationsEnvgroupsAttachmentsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListEnvironmentGroupAttachmentsResponse) 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) + } +} -type OrganizationsDevelopersSubscriptionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "apigee.organizations.environments.create": + +type OrganizationsEnvironmentsCreateCall struct { + s *Service + parent string + googlecloudapigeev1environment *GoogleCloudApigeeV1Environment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details for an API product subscription. +// Create: Creates an environment in an organization. // -// - name: Name of the API product subscription. Use the following -// structure in your request: -// `organizations/{org}/developers/{developer_email}/subscriptions/{sub -// scription}`. -func (r *OrganizationsDevelopersSubscriptionsService) Get(name string) *OrganizationsDevelopersSubscriptionsGetCall { - c := &OrganizationsDevelopersSubscriptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the organization in which the environment will be +// created. Use the following structure in your request: +// `organizations/{org}`. +func (r *OrganizationsEnvironmentsService) Create(parent string, googlecloudapigeev1environment *GoogleCloudApigeeV1Environment) *OrganizationsEnvironmentsCreateCall { + c := &OrganizationsEnvironmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1environment = googlecloudapigeev1environment + return c +} + +// Name sets the optional parameter "name": Name of the environment. +// Alternatively, the name may be specified in the request body in the +// name field. +func (c *OrganizationsEnvironmentsCreateCall) Name(name string) *OrganizationsEnvironmentsCreateCall { + c.urlParams_.Set("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 *OrganizationsDevelopersSubscriptionsGetCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersSubscriptionsGetCall { +func (c *OrganizationsEnvironmentsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsCreateCall { 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 *OrganizationsDevelopersSubscriptionsGetCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersSubscriptionsGetCall { - 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 *OrganizationsDevelopersSubscriptionsGetCall) Context(ctx context.Context) *OrganizationsDevelopersSubscriptionsGetCall { +func (c *OrganizationsEnvironmentsCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersSubscriptionsGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersSubscriptionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1environment) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/environments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.subscriptions.get" call. -// Exactly one of *GoogleCloudApigeeV1DeveloperSubscription or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1DeveloperSubscription.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 *OrganizationsDevelopersSubscriptionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeveloperSubscription, error) { +// Do executes the "apigee.organizations.environments.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 *OrganizationsEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25185,7 +28630,7 @@ func (c *OrganizationsDevelopersSubscriptionsGetCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeveloperSubscription{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25197,25 +28642,33 @@ func (c *OrganizationsDevelopersSubscriptionsGetCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Gets details for an API product subscription.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/subscriptions/{subscriptionsId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.developers.subscriptions.get", + // "description": "Creates an environment in an organization.", + // "flatPath": "v1/organizations/{organizationsId}/environments", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "name": { - // "description": "Required. Name of the API product subscription. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/subscriptions/{subscription}`", + // "description": "Optional. Name of the environment. Alternatively, the name may be specified in the request body in the name field.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of the organization in which the environment will be created. Use the following structure in your request: `organizations/{org}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+/subscriptions/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/environments", + // "request": { + // "$ref": "GoogleCloudApigeeV1Environment" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1DeveloperSubscription" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25224,118 +28677,84 @@ func (c *OrganizationsDevelopersSubscriptionsGetCall) Do(opts ...googleapi.CallO } -// method id "apigee.organizations.developers.subscriptions.list": +// method id "apigee.organizations.environments.delete": -type OrganizationsDevelopersSubscriptionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all API product subscriptions for a developer. +// Delete: Deletes an environment from an organization. **Note**: You +// must delete all key value maps and key value entries before you can +// delete an environment. // -// - parent: Email address of the developer. Use the following structure -// in your request: `organizations/{org}/developers/{developer_email}`. -func (r *OrganizationsDevelopersSubscriptionsService) List(parent string) *OrganizationsDevelopersSubscriptionsListCall { - c := &OrganizationsDevelopersSubscriptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Count sets the optional parameter "count": Number of API product -// subscriptions to return in the API call. Use with `startKey` to -// provide more targeted filtering. Defaults to 100. The maximum limit -// is 1000. -func (c *OrganizationsDevelopersSubscriptionsListCall) Count(count int64) *OrganizationsDevelopersSubscriptionsListCall { - c.urlParams_.Set("count", fmt.Sprint(count)) - return c -} - -// StartKey sets the optional parameter "startKey": Name of the API -// product subscription from which to start displaying the list of -// subscriptions. If omitted, the list starts from the first item. For -// example, to view the API product subscriptions from 51-150, set the -// value of `startKey` to the name of the 51st subscription and set the -// value of `count` to 100. -func (c *OrganizationsDevelopersSubscriptionsListCall) StartKey(startKey string) *OrganizationsDevelopersSubscriptionsListCall { - c.urlParams_.Set("startKey", startKey) +// - name: Name of the environment. Use the following structure in your +// request: `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsService) Delete(name string) *OrganizationsEnvironmentsDeleteCall { + c := &OrganizationsEnvironmentsDeleteCall{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 *OrganizationsDevelopersSubscriptionsListCall) Fields(s ...googleapi.Field) *OrganizationsDevelopersSubscriptionsListCall { +func (c *OrganizationsEnvironmentsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsDeleteCall { 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 *OrganizationsDevelopersSubscriptionsListCall) IfNoneMatch(entityTag string) *OrganizationsDevelopersSubscriptionsListCall { - 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 *OrganizationsDevelopersSubscriptionsListCall) Context(ctx context.Context) *OrganizationsDevelopersSubscriptionsListCall { +func (c *OrganizationsEnvironmentsDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDevelopersSubscriptionsListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDevelopersSubscriptionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+parent}/subscriptions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.developers.subscriptions.list" call. -// Exactly one of *GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse.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 *OrganizationsDevelopersSubscriptionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse, error) { +// Do executes the "apigee.organizations.environments.delete" 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 *OrganizationsEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25354,7 +28773,7 @@ func (c *OrganizationsDevelopersSubscriptionsListCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25366,36 +28785,25 @@ func (c *OrganizationsDevelopersSubscriptionsListCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Lists all API product subscriptions for a developer.", - // "flatPath": "v1/organizations/{organizationsId}/developers/{developersId}/subscriptions", - // "httpMethod": "GET", - // "id": "apigee.organizations.developers.subscriptions.list", + // "description": "Deletes an environment from an organization. **Note**: You must delete all key value maps and key value entries before you can delete an environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.environments.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "count": { - // "description": "Number of API product subscriptions to return in the API call. Use with `startKey` to provide more targeted filtering. Defaults to 100. The maximum limit is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "parent": { - // "description": "Required. Email address of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_email}`", + // "name": { + // "description": "Required. Name of the environment. Use the following structure in your request: `organizations/{org}/environments/{env}`", // "location": "path", - // "pattern": "^organizations/[^/]+/developers/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" - // }, - // "startKey": { - // "description": "Name of the API product subscription from which to start displaying the list of subscriptions. If omitted, the list starts from the first item. For example, to view the API product subscriptions from 51-150, set the value of `startKey` to the name of the 51st subscription and set the value of `count` to 100.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/subscriptions", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListDeveloperSubscriptionsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25404,98 +28812,96 @@ func (c *OrganizationsDevelopersSubscriptionsListCall) Do(opts ...googleapi.Call } -// method id "apigee.organizations.endpointAttachments.create": +// method id "apigee.organizations.environments.get": -type OrganizationsEndpointAttachmentsCreateCall struct { - s *Service - parent string - googlecloudapigeev1endpointattachment *GoogleCloudApigeeV1EndpointAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates an endpoint attachment. **Note:** Not supported for -// Apigee hybrid. +// Get: Gets environment details. // -// - parent: Organization the endpoint attachment will be created in. -func (r *OrganizationsEndpointAttachmentsService) Create(parent string, googlecloudapigeev1endpointattachment *GoogleCloudApigeeV1EndpointAttachment) *OrganizationsEndpointAttachmentsCreateCall { - c := &OrganizationsEndpointAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1endpointattachment = googlecloudapigeev1endpointattachment - return c -} - -// EndpointAttachmentId sets the optional parameter -// "endpointAttachmentId": ID to use for the endpoint attachment. The ID -// can contain lowercase letters and numbers, must start with a letter, -// and must be 1-20 characters in length. -func (c *OrganizationsEndpointAttachmentsCreateCall) EndpointAttachmentId(endpointAttachmentId string) *OrganizationsEndpointAttachmentsCreateCall { - c.urlParams_.Set("endpointAttachmentId", endpointAttachmentId) +// - name: Name of the environment. Use the following structure in your +// request: `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsService) Get(name string) *OrganizationsEnvironmentsGetCall { + c := &OrganizationsEnvironmentsGetCall{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 *OrganizationsEndpointAttachmentsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEndpointAttachmentsCreateCall { +func (c *OrganizationsEnvironmentsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsGetCall { 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 *OrganizationsEnvironmentsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsGetCall { + 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 *OrganizationsEndpointAttachmentsCreateCall) Context(ctx context.Context) *OrganizationsEndpointAttachmentsCreateCall { +func (c *OrganizationsEnvironmentsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEndpointAttachmentsCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEndpointAttachmentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1endpointattachment) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpointAttachments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.endpointAttachments.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 +// Do executes the "apigee.organizations.environments.get" call. +// Exactly one of *GoogleCloudApigeeV1Environment or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Environment.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 *OrganizationsEndpointAttachmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Environment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25514,7 +28920,7 @@ func (c *OrganizationsEndpointAttachmentsCreateCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1Environment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25526,33 +28932,25 @@ func (c *OrganizationsEndpointAttachmentsCreateCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Creates an endpoint attachment. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/endpointAttachments", - // "httpMethod": "POST", - // "id": "apigee.organizations.endpointAttachments.create", + // "description": "Gets environment details.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "endpointAttachmentId": { - // "description": "ID to use for the endpoint attachment. The ID can contain lowercase letters and numbers, must start with a letter, and must be 1-20 characters in length.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Organization the endpoint attachment will be created in.", + // "name": { + // "description": "Required. Name of the environment. Use the following structure in your request: `organizations/{org}/environments/{env}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/endpointAttachments", - // "request": { - // "$ref": "GoogleCloudApigeeV1EndpointAttachment" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1Environment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25561,23 +28959,24 @@ func (c *OrganizationsEndpointAttachmentsCreateCall) Do(opts ...googleapi.CallOp } -// method id "apigee.organizations.endpointAttachments.delete": +// method id "apigee.organizations.environments.getDebugmask": -type OrganizationsEndpointAttachmentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsGetDebugmaskCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an endpoint attachment. +// GetDebugmask: Gets the debug mask singleton resource for an +// environment. // -// - name: Name of the endpoint attachment. Use the following structure -// in your request: -// `organizations/{org}/endpointAttachments/{endpoint_attachment}`. -func (r *OrganizationsEndpointAttachmentsService) Delete(name string) *OrganizationsEndpointAttachmentsDeleteCall { - c := &OrganizationsEndpointAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the debug mask. Use the following structure in your +// request: `organizations/{org}/environments/{env}/debugmask`. +func (r *OrganizationsEnvironmentsService) GetDebugmask(name string) *OrganizationsEnvironmentsGetDebugmaskCall { + c := &OrganizationsEnvironmentsGetDebugmaskCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -25585,41 +28984,54 @@ func (r *OrganizationsEndpointAttachmentsService) Delete(name string) *Organizat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEndpointAttachmentsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEndpointAttachmentsDeleteCall { +func (c *OrganizationsEnvironmentsGetDebugmaskCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsGetDebugmaskCall { 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 *OrganizationsEnvironmentsGetDebugmaskCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsGetDebugmaskCall { + 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 *OrganizationsEndpointAttachmentsDeleteCall) Context(ctx context.Context) *OrganizationsEndpointAttachmentsDeleteCall { +func (c *OrganizationsEnvironmentsGetDebugmaskCall) Context(ctx context.Context) *OrganizationsEnvironmentsGetDebugmaskCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEndpointAttachmentsDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsGetDebugmaskCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEndpointAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsGetDebugmaskCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -25630,14 +29042,14 @@ func (c *OrganizationsEndpointAttachmentsDeleteCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.endpointAttachments.delete" 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 +// Do executes the "apigee.organizations.environments.getDebugmask" call. +// Exactly one of *GoogleCloudApigeeV1DebugMask or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1DebugMask.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 *OrganizationsEndpointAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsEnvironmentsGetDebugmaskCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DebugMask, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25656,7 +29068,7 @@ func (c *OrganizationsEndpointAttachmentsDeleteCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1DebugMask{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25668,25 +29080,25 @@ func (c *OrganizationsEndpointAttachmentsDeleteCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Deletes an endpoint attachment.", - // "flatPath": "v1/organizations/{organizationsId}/endpointAttachments/{endpointAttachmentsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.endpointAttachments.delete", + // "description": "Gets the debug mask singleton resource for an environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/debugmask", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.getDebugmask", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the endpoint attachment. Use the following structure in your request: `organizations/{org}/endpointAttachments/{endpoint_attachment}`", + // "description": "Required. Name of the debug mask. Use the following structure in your request: `organizations/{org}/environments/{env}/debugmask`.", // "location": "path", - // "pattern": "^organizations/[^/]+/endpointAttachments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/debugmask$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1DebugMask" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25695,9 +29107,9 @@ func (c *OrganizationsEndpointAttachmentsDeleteCall) Do(opts ...googleapi.CallOp } -// method id "apigee.organizations.endpointAttachments.get": +// method id "apigee.organizations.environments.getDeployedConfig": -type OrganizationsEndpointAttachmentsGetCall struct { +type OrganizationsEnvironmentsGetDeployedConfigCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -25706,13 +29118,14 @@ type OrganizationsEndpointAttachmentsGetCall struct { header_ http.Header } -// Get: Gets the endpoint attachment. +// GetDeployedConfig: Gets the deployed configuration for an +// environment. // -// - name: Name of the endpoint attachment. Use the following structure -// in your request: -// `organizations/{org}/endpointAttachments/{endpoint_attachment}`. -func (r *OrganizationsEndpointAttachmentsService) Get(name string) *OrganizationsEndpointAttachmentsGetCall { - c := &OrganizationsEndpointAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the environment deployed configuration resource. Use +// the following structure in your request: +// `organizations/{org}/environments/{env}/deployedConfig`. +func (r *OrganizationsEnvironmentsService) GetDeployedConfig(name string) *OrganizationsEnvironmentsGetDeployedConfigCall { + c := &OrganizationsEnvironmentsGetDeployedConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -25720,7 +29133,7 @@ func (r *OrganizationsEndpointAttachmentsService) Get(name string) *Organization // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEndpointAttachmentsGetCall) Fields(s ...googleapi.Field) *OrganizationsEndpointAttachmentsGetCall { +func (c *OrganizationsEnvironmentsGetDeployedConfigCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsGetDeployedConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25730,7 +29143,7 @@ func (c *OrganizationsEndpointAttachmentsGetCall) Fields(s ...googleapi.Field) * // 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 *OrganizationsEndpointAttachmentsGetCall) IfNoneMatch(entityTag string) *OrganizationsEndpointAttachmentsGetCall { +func (c *OrganizationsEnvironmentsGetDeployedConfigCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsGetDeployedConfigCall { c.ifNoneMatch_ = entityTag return c } @@ -25738,21 +29151,21 @@ func (c *OrganizationsEndpointAttachmentsGetCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEndpointAttachmentsGetCall) Context(ctx context.Context) *OrganizationsEndpointAttachmentsGetCall { +func (c *OrganizationsEnvironmentsGetDeployedConfigCall) Context(ctx context.Context) *OrganizationsEnvironmentsGetDeployedConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEndpointAttachmentsGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsGetDeployedConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEndpointAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsGetDeployedConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -25778,15 +29191,15 @@ func (c *OrganizationsEndpointAttachmentsGetCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.endpointAttachments.get" call. -// Exactly one of *GoogleCloudApigeeV1EndpointAttachment or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudApigeeV1EndpointAttachment.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 *OrganizationsEndpointAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1EndpointAttachment, error) { +// Do executes the "apigee.organizations.environments.getDeployedConfig" call. +// Exactly one of *GoogleCloudApigeeV1EnvironmentConfig or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1EnvironmentConfig.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 *OrganizationsEnvironmentsGetDeployedConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1EnvironmentConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25805,7 +29218,7 @@ func (c *OrganizationsEndpointAttachmentsGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1EndpointAttachment{ + ret := &GoogleCloudApigeeV1EnvironmentConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25817,25 +29230,25 @@ func (c *OrganizationsEndpointAttachmentsGetCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Gets the endpoint attachment.", - // "flatPath": "v1/organizations/{organizationsId}/endpointAttachments/{endpointAttachmentsId}", + // "description": "Gets the deployed configuration for an environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/deployedConfig", // "httpMethod": "GET", - // "id": "apigee.organizations.endpointAttachments.get", + // "id": "apigee.organizations.environments.getDeployedConfig", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the endpoint attachment. Use the following structure in your request: `organizations/{org}/endpointAttachments/{endpoint_attachment}`", + // "description": "Required. Name of the environment deployed configuration resource. Use the following structure in your request: `organizations/{org}/environments/{env}/deployedConfig`", // "location": "path", - // "pattern": "^organizations/[^/]+/endpointAttachments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/deployedConfig$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1EndpointAttachment" + // "$ref": "GoogleCloudApigeeV1EnvironmentConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25844,48 +29257,55 @@ func (c *OrganizationsEndpointAttachmentsGetCall) Do(opts ...googleapi.CallOptio } -// method id "apigee.organizations.endpointAttachments.list": +// method id "apigee.organizations.environments.getIamPolicy": -type OrganizationsEndpointAttachmentsListCall struct { +type OrganizationsEnvironmentsGetIamPolicyCall struct { s *Service - parent string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the endpoint attachments in an organization. +// GetIamPolicy: Gets the IAM policy on an environment. For more +// information, see Manage users, roles, and permissions using the API +// (https://cloud.google.com/apigee/docs/api-platform/system-administration/manage-users-roles). +// You must have the `apigee.environments.getIamPolicy` permission to +// call this API. // -// - parent: Name of the organization for which to list endpoint -// attachments. Use the following structure in your request: -// `organizations/{org}`. -func (r *OrganizationsEndpointAttachmentsService) List(parent string) *OrganizationsEndpointAttachmentsListCall { - c := &OrganizationsEndpointAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// endpoint attachments to return. If unspecified, at most 25 -// attachments will be returned. -func (c *OrganizationsEndpointAttachmentsListCall) PageSize(pageSize int64) *OrganizationsEndpointAttachmentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *OrganizationsEnvironmentsService) GetIamPolicy(resource string) *OrganizationsEnvironmentsGetIamPolicyCall { + c := &OrganizationsEnvironmentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// PageToken sets the optional parameter "pageToken": Page token, -// returned from a previous `ListEndpointAttachments` call, that you can -// use to retrieve the next page. -func (c *OrganizationsEndpointAttachmentsListCall) PageToken(pageToken string) *OrganizationsEndpointAttachmentsListCall { - c.urlParams_.Set("pageToken", pageToken) +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *OrganizationsEnvironmentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *OrganizationsEnvironmentsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEndpointAttachmentsListCall) Fields(s ...googleapi.Field) *OrganizationsEndpointAttachmentsListCall { +func (c *OrganizationsEnvironmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25895,7 +29315,7 @@ func (c *OrganizationsEndpointAttachmentsListCall) Fields(s ...googleapi.Field) // 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 *OrganizationsEndpointAttachmentsListCall) IfNoneMatch(entityTag string) *OrganizationsEndpointAttachmentsListCall { +func (c *OrganizationsEnvironmentsGetIamPolicyCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -25903,21 +29323,21 @@ func (c *OrganizationsEndpointAttachmentsListCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEndpointAttachmentsListCall) Context(ctx context.Context) *OrganizationsEndpointAttachmentsListCall { +func (c *OrganizationsEnvironmentsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsEnvironmentsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEndpointAttachmentsListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEndpointAttachmentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -25930,7 +29350,7 @@ func (c *OrganizationsEndpointAttachmentsListCall) doRequest(alt string) (*http. var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpointAttachments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -25938,21 +29358,19 @@ func (c *OrganizationsEndpointAttachmentsListCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.endpointAttachments.list" call. -// Exactly one of *GoogleCloudApigeeV1ListEndpointAttachmentsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListEndpointAttachmentsResponse.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 *OrganizationsEndpointAttachmentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListEndpointAttachmentsResponse, error) { +// Do executes the "apigee.organizations.environments.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *OrganizationsEnvironmentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25971,7 +29389,7 @@ func (c *OrganizationsEndpointAttachmentsListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListEndpointAttachmentsResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25983,36 +29401,31 @@ func (c *OrganizationsEndpointAttachmentsListCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Lists the endpoint attachments in an organization.", - // "flatPath": "v1/organizations/{organizationsId}/endpointAttachments", + // "description": "Gets the IAM policy on an environment. For more information, see [Manage users, roles, and permissions using the API](https://cloud.google.com/apigee/docs/api-platform/system-administration/manage-users-roles). You must have the `apigee.environments.getIamPolicy` permission to call this API.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}:getIamPolicy", // "httpMethod": "GET", - // "id": "apigee.organizations.endpointAttachments.list", + // "id": "apigee.organizations.environments.getIamPolicy", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "pageSize": { - // "description": "Optional. Maximum number of endpoint attachments to return. If unspecified, at most 25 attachments will be returned.", + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", // "format": "int32", // "location": "query", // "type": "integer" // }, - // "pageToken": { - // "description": "Optional. Page token, returned from a previous `ListEndpointAttachments` call, that you can use to retrieve the next page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Name of the organization for which to list endpoint attachments. Use the following structure in your request: `organizations/{org}`", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/endpointAttachments", + // "path": "v1/{+resource}:getIamPolicy", // "response": { - // "$ref": "GoogleCloudApigeeV1ListEndpointAttachmentsResponse" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26021,117 +29434,97 @@ func (c *OrganizationsEndpointAttachmentsListCall) Do(opts ...googleapi.CallOpti } -// 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 *OrganizationsEndpointAttachmentsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListEndpointAttachmentsResponse) 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 "apigee.organizations.envgroups.create": +// method id "apigee.organizations.environments.getTraceConfig": -type OrganizationsEnvgroupsCreateCall struct { - s *Service - parent string - googlecloudapigeev1environmentgroup *GoogleCloudApigeeV1EnvironmentGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsGetTraceConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new environment group. +// GetTraceConfig: Get distributed trace configuration in an +// environment. // -// - parent: Name of the organization in which to create the environment -// group in the following format: `organizations/{org}`. -func (r *OrganizationsEnvgroupsService) Create(parent string, googlecloudapigeev1environmentgroup *GoogleCloudApigeeV1EnvironmentGroup) *OrganizationsEnvgroupsCreateCall { - c := &OrganizationsEnvgroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1environmentgroup = googlecloudapigeev1environmentgroup - return c -} - -// Name sets the optional parameter "name": ID of the environment group. -// Overrides any ID in the environment_group resource. -func (c *OrganizationsEnvgroupsCreateCall) Name(name string) *OrganizationsEnvgroupsCreateCall { - c.urlParams_.Set("name", name) +// - name: Name of the trace configuration. Use the following structure +// in your request: "organizations/*/environments/*/traceConfig". +func (r *OrganizationsEnvironmentsService) GetTraceConfig(name string) *OrganizationsEnvironmentsGetTraceConfigCall { + c := &OrganizationsEnvironmentsGetTraceConfigCall{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 *OrganizationsEnvgroupsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsCreateCall { +func (c *OrganizationsEnvironmentsGetTraceConfigCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsGetTraceConfigCall { 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 *OrganizationsEnvironmentsGetTraceConfigCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsGetTraceConfigCall { + 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 *OrganizationsEnvgroupsCreateCall) Context(ctx context.Context) *OrganizationsEnvgroupsCreateCall { +func (c *OrganizationsEnvironmentsGetTraceConfigCall) Context(ctx context.Context) *OrganizationsEnvironmentsGetTraceConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvgroupsCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsGetTraceConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvgroupsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsGetTraceConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1environmentgroup) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/envgroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.envgroups.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 +// Do executes the "apigee.organizations.environments.getTraceConfig" call. +// Exactly one of *GoogleCloudApigeeV1TraceConfig or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1TraceConfig.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 *OrganizationsEnvgroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsEnvironmentsGetTraceConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TraceConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26150,7 +29543,7 @@ func (c *OrganizationsEnvgroupsCreateCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1TraceConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26162,33 +29555,25 @@ func (c *OrganizationsEnvgroupsCreateCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Creates a new environment group.", - // "flatPath": "v1/organizations/{organizationsId}/envgroups", - // "httpMethod": "POST", - // "id": "apigee.organizations.envgroups.create", + // "description": "Get distributed trace configuration in an environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.getTraceConfig", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { // "name": { - // "description": "ID of the environment group. Overrides any ID in the environment_group resource.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Name of the organization in which to create the environment group in the following format: `organizations/{org}`.", + // "description": "Required. Name of the trace configuration. Use the following structure in your request: \"organizations/*/environments/*/traceConfig\".", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/envgroups", - // "request": { - // "$ref": "GoogleCloudApigeeV1EnvironmentGroup" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1TraceConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26197,30 +29582,39 @@ func (c *OrganizationsEnvgroupsCreateCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "apigee.organizations.envgroups.delete": +// method id "apigee.organizations.environments.setIamPolicy": -type OrganizationsEnvgroupsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an environment group. +// SetIamPolicy: Sets the IAM policy on an environment, if the policy +// already exists it will be replaced. For more information, see Manage +// users, roles, and permissions using the API +// (https://cloud.google.com/apigee/docs/api-platform/system-administration/manage-users-roles). +// You must have the `apigee.environments.setIamPolicy` permission to +// call this API. // -// - name: Name of the environment group in the following format: -// `organizations/{org}/envgroups/{envgroup}`. -func (r *OrganizationsEnvgroupsService) Delete(name string) *OrganizationsEnvgroupsDeleteCall { - c := &OrganizationsEnvgroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *OrganizationsEnvironmentsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *OrganizationsEnvironmentsSetIamPolicyCall { + c := &OrganizationsEnvironmentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvgroupsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsDeleteCall { +func (c *OrganizationsEnvironmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26228,21 +29622,21 @@ func (c *OrganizationsEnvgroupsDeleteCall) Fields(s ...googleapi.Field) *Organiz // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvgroupsDeleteCall) Context(ctx context.Context) *OrganizationsEnvgroupsDeleteCall { +func (c *OrganizationsEnvironmentsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsEnvironmentsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvgroupsDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvgroupsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -26250,29 +29644,34 @@ func (c *OrganizationsEnvgroupsDeleteCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.envgroups.delete" 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 +// Do executes the "apigee.organizations.environments.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *OrganizationsEnvgroupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsEnvironmentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26291,7 +29690,7 @@ func (c *OrganizationsEnvgroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26303,25 +29702,28 @@ func (c *OrganizationsEnvgroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Deletes an environment group.", - // "flatPath": "v1/organizations/{organizationsId}/envgroups/{envgroupsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.envgroups.delete", + // "description": "Sets the IAM policy on an environment, if the policy already exists it will be replaced. For more information, see [Manage users, roles, and permissions using the API](https://cloud.google.com/apigee/docs/api-platform/system-administration/manage-users-roles). You must have the `apigee.environments.setIamPolicy` permission to call this API.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.setIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the environment group in the following format: `organizations/{org}/envgroups/{envgroup}`.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^organizations/[^/]+/envgroups/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26330,97 +29732,84 @@ func (c *OrganizationsEnvgroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "apigee.organizations.envgroups.get": +// method id "apigee.organizations.environments.subscribe": -type OrganizationsEnvgroupsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsSubscribeCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets an environment group. +// Subscribe: Creates a subscription for the environment's Pub/Sub +// topic. The server will assign a random name for this subscription. +// The "name" and "push_config" must *not* be specified. // -// - name: Name of the environment group in the following format: -// `organizations/{org}/envgroups/{envgroup}`. -func (r *OrganizationsEnvgroupsService) Get(name string) *OrganizationsEnvgroupsGetCall { - c := &OrganizationsEnvgroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the environment. Use the following structure in +// your request: `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsService) Subscribe(parent string) *OrganizationsEnvironmentsSubscribeCall { + c := &OrganizationsEnvironmentsSubscribeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvgroupsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsGetCall { +func (c *OrganizationsEnvironmentsSubscribeCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSubscribeCall { 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 *OrganizationsEnvgroupsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvgroupsGetCall { - 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 *OrganizationsEnvgroupsGetCall) Context(ctx context.Context) *OrganizationsEnvgroupsGetCall { +func (c *OrganizationsEnvironmentsSubscribeCall) Context(ctx context.Context) *OrganizationsEnvironmentsSubscribeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvgroupsGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsSubscribeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvgroupsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsSubscribeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:subscribe") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.envgroups.get" call. -// Exactly one of *GoogleCloudApigeeV1EnvironmentGroup or error will be +// Do executes the "apigee.organizations.environments.subscribe" call. +// Exactly one of *GoogleCloudApigeeV1Subscription or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1EnvironmentGroup.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 *OrganizationsEnvgroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1EnvironmentGroup, error) { +// either *GoogleCloudApigeeV1Subscription.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 *OrganizationsEnvironmentsSubscribeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Subscription, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26439,7 +29828,7 @@ func (c *OrganizationsEnvgroupsGetCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1EnvironmentGroup{ + ret := &GoogleCloudApigeeV1Subscription{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26451,25 +29840,25 @@ func (c *OrganizationsEnvgroupsGetCall) Do(opts ...googleapi.CallOption) (*Googl } return ret, nil // { - // "description": "Gets an environment group.", - // "flatPath": "v1/organizations/{organizationsId}/envgroups/{envgroupsId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.envgroups.get", + // "description": "Creates a subscription for the environment's Pub/Sub topic. The server will assign a random name for this subscription. The \"name\" and \"push_config\" must *not* be specified.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}:subscribe", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.subscribe", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the environment group in the following format: `organizations/{org}/envgroups/{envgroup}`.", + // "parent": { + // "description": "Required. Name of the environment. Use the following structure in your request: `organizations/{org}/environments/{env}`", // "location": "path", - // "pattern": "^organizations/[^/]+/envgroups/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}:subscribe", // "response": { - // "$ref": "GoogleCloudApigeeV1EnvironmentGroup" + // "$ref": "GoogleCloudApigeeV1Subscription" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26478,113 +29867,95 @@ func (c *OrganizationsEnvgroupsGetCall) Do(opts ...googleapi.CallOption) (*Googl } -// method id "apigee.organizations.envgroups.list": +// method id "apigee.organizations.environments.testIamPermissions": -type OrganizationsEnvgroupsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all environment groups. +// TestIamPermissions: Tests the permissions of a user on an +// environment, and returns a subset of permissions that the user has on +// the environment. If the environment does not exist, an empty +// permission set is returned (a NOT_FOUND error is not returned). // -// - parent: Name of the organization for which to list environment -// groups in the following format: `organizations/{org}`. -func (r *OrganizationsEnvgroupsService) List(parent string) *OrganizationsEnvgroupsListCall { - c := &OrganizationsEnvgroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// environment groups to return. The page size defaults to 25. -func (c *OrganizationsEnvgroupsListCall) PageSize(pageSize int64) *OrganizationsEnvgroupsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token, -// returned from a previous ListEnvironmentGroups call, that you can use -// to retrieve the next page. -func (c *OrganizationsEnvgroupsListCall) PageToken(pageToken string) *OrganizationsEnvgroupsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *OrganizationsEnvironmentsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *OrganizationsEnvironmentsTestIamPermissionsCall { + c := &OrganizationsEnvironmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvgroupsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsListCall { +func (c *OrganizationsEnvironmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTestIamPermissionsCall { 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 *OrganizationsEnvgroupsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvgroupsListCall { - 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 *OrganizationsEnvgroupsListCall) Context(ctx context.Context) *OrganizationsEnvgroupsListCall { +func (c *OrganizationsEnvironmentsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsEnvironmentsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvgroupsListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvgroupsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + 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, "v1/{+parent}/envgroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.envgroups.list" call. -// Exactly one of *GoogleCloudApigeeV1ListEnvironmentGroupsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListEnvironmentGroupsResponse.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 *OrganizationsEnvgroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListEnvironmentGroupsResponse, error) { +// Do executes the "apigee.organizations.environments.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.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 *OrganizationsEnvironmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26603,7 +29974,7 @@ func (c *OrganizationsEnvgroupsListCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListEnvironmentGroupsResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26615,36 +29986,28 @@ func (c *OrganizationsEnvgroupsListCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Lists all environment groups.", - // "flatPath": "v1/organizations/{organizationsId}/envgroups", - // "httpMethod": "GET", - // "id": "apigee.organizations.envgroups.list", + // "description": "Tests the permissions of a user on an environment, and returns a subset of permissions that the user has on the environment. If the environment does not exist, an empty permission set is returned (a NOT_FOUND error is not returned).", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.testIamPermissions", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "pageSize": { - // "description": "Maximum number of environment groups to return. The page size defaults to 25.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Page token, returned from a previous ListEnvironmentGroups call, that you can use to retrieve the next page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Name of the organization for which to list environment groups in the following format: `organizations/{org}`.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/envgroups", + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ListEnvironmentGroupsResponse" + // "$ref": "GoogleIamV1TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26653,60 +30016,33 @@ func (c *OrganizationsEnvgroupsListCall) Do(opts ...googleapi.CallOption) (*Goog } -// 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 *OrganizationsEnvgroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListEnvironmentGroupsResponse) 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 "apigee.organizations.envgroups.patch": +// method id "apigee.organizations.environments.unsubscribe": -type OrganizationsEnvgroupsPatchCall struct { - s *Service - name string - googlecloudapigeev1environmentgroup *GoogleCloudApigeeV1EnvironmentGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsUnsubscribeCall struct { + s *Service + parent string + googlecloudapigeev1subscription *GoogleCloudApigeeV1Subscription + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an environment group. +// Unsubscribe: Deletes a subscription for the environment's Pub/Sub +// topic. // -// - name: Name of the environment group to update in the format: -// `organizations/{org}/envgroups/{envgroup}. -func (r *OrganizationsEnvgroupsService) Patch(name string, googlecloudapigeev1environmentgroup *GoogleCloudApigeeV1EnvironmentGroup) *OrganizationsEnvgroupsPatchCall { - c := &OrganizationsEnvgroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1environmentgroup = googlecloudapigeev1environmentgroup - return c -} - -// UpdateMask sets the optional parameter "updateMask": List of fields -// to be updated. -func (c *OrganizationsEnvgroupsPatchCall) UpdateMask(updateMask string) *OrganizationsEnvgroupsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: Name of the environment. Use the following structure in +// your request: `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsService) Unsubscribe(parent string, googlecloudapigeev1subscription *GoogleCloudApigeeV1Subscription) *OrganizationsEnvironmentsUnsubscribeCall { + c := &OrganizationsEnvironmentsUnsubscribeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1subscription = googlecloudapigeev1subscription return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvgroupsPatchCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsPatchCall { +func (c *OrganizationsEnvironmentsUnsubscribeCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsUnsubscribeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26714,21 +30050,21 @@ func (c *OrganizationsEnvgroupsPatchCall) Fields(s ...googleapi.Field) *Organiza // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvgroupsPatchCall) Context(ctx context.Context) *OrganizationsEnvgroupsPatchCall { +func (c *OrganizationsEnvironmentsUnsubscribeCall) Context(ctx context.Context) *OrganizationsEnvironmentsUnsubscribeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvgroupsPatchCall) Header() http.Header { +func (c *OrganizationsEnvironmentsUnsubscribeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvgroupsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsUnsubscribeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -26736,34 +30072,34 @@ func (c *OrganizationsEnvgroupsPatchCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1environmentgroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1subscription) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:unsubscribe") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.envgroups.patch" 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 +// Do executes the "apigee.organizations.environments.unsubscribe" 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 *OrganizationsEnvgroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsEnvironmentsUnsubscribeCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26782,7 +30118,7 @@ func (c *OrganizationsEnvgroupsPatchCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26794,34 +30130,28 @@ func (c *OrganizationsEnvgroupsPatchCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Updates an environment group.", - // "flatPath": "v1/organizations/{organizationsId}/envgroups/{envgroupsId}", - // "httpMethod": "PATCH", - // "id": "apigee.organizations.envgroups.patch", + // "description": "Deletes a subscription for the environment's Pub/Sub topic.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}:unsubscribe", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.unsubscribe", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the environment group to update in the format: `organizations/{org}/envgroups/{envgroup}.", + // "parent": { + // "description": "Required. Name of the environment. Use the following structure in your request: `organizations/{org}/environments/{env}`", // "location": "path", - // "pattern": "^organizations/[^/]+/envgroups/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "List of fields to be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}:unsubscribe", // "request": { - // "$ref": "GoogleCloudApigeeV1EnvironmentGroup" + // "$ref": "GoogleCloudApigeeV1Subscription" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26830,33 +30160,38 @@ func (c *OrganizationsEnvgroupsPatchCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "apigee.organizations.envgroups.attachments.create": +// method id "apigee.organizations.environments.update": -type OrganizationsEnvgroupsAttachmentsCreateCall struct { - s *Service - parent string - googlecloudapigeev1environmentgroupattachment *GoogleCloudApigeeV1EnvironmentGroupAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsUpdateCall struct { + s *Service + name string + googlecloudapigeev1environment *GoogleCloudApigeeV1Environment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new attachment of an environment to an environment -// group. +// Update: Updates an existing environment. When updating properties, +// you must pass all existing properties to the API, even if they are +// not being changed. If you omit properties from the payload, the +// properties are removed. To get the current list of properties for the +// environment, use the Get Environment API (get). **Note**: Both `PUT` +// and `POST` methods are supported for updating an existing +// environment. // -// - parent: EnvironmentGroup under which to create the attachment in -// the following format: `organizations/{org}/envgroups/{envgroup}`. -func (r *OrganizationsEnvgroupsAttachmentsService) Create(parent string, googlecloudapigeev1environmentgroupattachment *GoogleCloudApigeeV1EnvironmentGroupAttachment) *OrganizationsEnvgroupsAttachmentsCreateCall { - c := &OrganizationsEnvgroupsAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1environmentgroupattachment = googlecloudapigeev1environmentgroupattachment +// - name: Name of the environment. Use the following structure in your +// request: `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsService) Update(name string, googlecloudapigeev1environment *GoogleCloudApigeeV1Environment) *OrganizationsEnvironmentsUpdateCall { + c := &OrganizationsEnvironmentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1environment = googlecloudapigeev1environment return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvgroupsAttachmentsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsAttachmentsCreateCall { +func (c *OrganizationsEnvironmentsUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26864,21 +30199,21 @@ func (c *OrganizationsEnvgroupsAttachmentsCreateCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvgroupsAttachmentsCreateCall) Context(ctx context.Context) *OrganizationsEnvgroupsAttachmentsCreateCall { +func (c *OrganizationsEnvironmentsUpdateCall) Context(ctx context.Context) *OrganizationsEnvironmentsUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvgroupsAttachmentsCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvgroupsAttachmentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -26886,34 +30221,34 @@ func (c *OrganizationsEnvgroupsAttachmentsCreateCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1environmentgroupattachment) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1environment) 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, "v1/{+parent}/attachments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.envgroups.attachments.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 +// Do executes the "apigee.organizations.environments.update" call. +// Exactly one of *GoogleCloudApigeeV1Environment or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Environment.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 *OrganizationsEnvgroupsAttachmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsEnvironmentsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Environment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26932,7 +30267,7 @@ func (c *OrganizationsEnvgroupsAttachmentsCreateCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1Environment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26944,28 +30279,28 @@ func (c *OrganizationsEnvgroupsAttachmentsCreateCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Creates a new attachment of an environment to an environment group.", - // "flatPath": "v1/organizations/{organizationsId}/envgroups/{envgroupsId}/attachments", - // "httpMethod": "POST", - // "id": "apigee.organizations.envgroups.attachments.create", + // "description": "Updates an existing environment. When updating properties, you must pass all existing properties to the API, even if they are not being changed. If you omit properties from the payload, the properties are removed. To get the current list of properties for the environment, use the [Get Environment API](get). **Note**: Both `PUT` and `POST` methods are supported for updating an existing environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}", + // "httpMethod": "PUT", + // "id": "apigee.organizations.environments.update", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. EnvironmentGroup under which to create the attachment in the following format: `organizations/{org}/envgroups/{envgroup}`.", + // "name": { + // "description": "Required. Name of the environment. Use the following structure in your request: `organizations/{org}/environments/{env}`", // "location": "path", - // "pattern": "^organizations/[^/]+/envgroups/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/attachments", + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudApigeeV1EnvironmentGroupAttachment" + // "$ref": "GoogleCloudApigeeV1Environment" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1Environment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26974,31 +30309,49 @@ func (c *OrganizationsEnvgroupsAttachmentsCreateCall) Do(opts ...googleapi.CallO } -// method id "apigee.organizations.envgroups.attachments.delete": +// method id "apigee.organizations.environments.updateDebugmask": -type OrganizationsEnvgroupsAttachmentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsUpdateDebugmaskCall struct { + s *Service + name string + googlecloudapigeev1debugmask *GoogleCloudApigeeV1DebugMask + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an environment group attachment. +// UpdateDebugmask: Updates the debug mask singleton resource for an +// environment. // -// - name: Name of the environment group attachment to delete in the -// following format: -// `organizations/{org}/envgroups/{envgroup}/attachments/{attachment}`. -func (r *OrganizationsEnvgroupsAttachmentsService) Delete(name string) *OrganizationsEnvgroupsAttachmentsDeleteCall { - c := &OrganizationsEnvgroupsAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the debug mask. +func (r *OrganizationsEnvironmentsService) UpdateDebugmask(name string, googlecloudapigeev1debugmask *GoogleCloudApigeeV1DebugMask) *OrganizationsEnvironmentsUpdateDebugmaskCall { + c := &OrganizationsEnvironmentsUpdateDebugmaskCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudapigeev1debugmask = googlecloudapigeev1debugmask + return c +} + +// ReplaceRepeatedFields sets the optional parameter +// "replaceRepeatedFields": Boolean flag that specifies whether to +// replace existing values in the debug mask when doing an update. Set +// to true to replace existing values. The default behavior is to append +// the values (false). +func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) ReplaceRepeatedFields(replaceRepeatedFields bool) *OrganizationsEnvironmentsUpdateDebugmaskCall { + c.urlParams_.Set("replaceRepeatedFields", fmt.Sprint(replaceRepeatedFields)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field debug mask +// to support partial updates. +func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) UpdateMask(updateMask string) *OrganizationsEnvironmentsUpdateDebugmaskCall { + 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 *OrganizationsEnvgroupsAttachmentsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsAttachmentsDeleteCall { +func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsUpdateDebugmaskCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27006,21 +30359,21 @@ func (c *OrganizationsEnvgroupsAttachmentsDeleteCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvgroupsAttachmentsDeleteCall) Context(ctx context.Context) *OrganizationsEnvgroupsAttachmentsDeleteCall { +func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) Context(ctx context.Context) *OrganizationsEnvironmentsUpdateDebugmaskCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvgroupsAttachmentsDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvgroupsAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27028,11 +30381,16 @@ func (c *OrganizationsEnvgroupsAttachmentsDeleteCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1debugmask) + 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -27043,14 +30401,14 @@ func (c *OrganizationsEnvgroupsAttachmentsDeleteCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.envgroups.attachments.delete" 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 +// Do executes the "apigee.organizations.environments.updateDebugmask" call. +// Exactly one of *GoogleCloudApigeeV1DebugMask or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1DebugMask.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 *OrganizationsEnvgroupsAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DebugMask, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27069,7 +30427,7 @@ func (c *OrganizationsEnvgroupsAttachmentsDeleteCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1DebugMask{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27081,25 +30439,39 @@ func (c *OrganizationsEnvgroupsAttachmentsDeleteCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Deletes an environment group attachment.", - // "flatPath": "v1/organizations/{organizationsId}/envgroups/{envgroupsId}/attachments/{attachmentsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.envgroups.attachments.delete", + // "description": "Updates the debug mask singleton resource for an environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/debugmask", + // "httpMethod": "PATCH", + // "id": "apigee.organizations.environments.updateDebugmask", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the environment group attachment to delete in the following format: `organizations/{org}/envgroups/{envgroup}/attachments/{attachment}`.", + // "description": "Name of the debug mask.", // "location": "path", - // "pattern": "^organizations/[^/]+/envgroups/[^/]+/attachments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/debugmask$", // "required": true, // "type": "string" + // }, + // "replaceRepeatedFields": { + // "description": "Boolean flag that specifies whether to replace existing values in the debug mask when doing an update. Set to true to replace existing values. The default behavior is to append the values (false).", + // "location": "query", + // "type": "boolean" + // }, + // "updateMask": { + // "description": "Field debug mask to support partial updates.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1DebugMask" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1DebugMask" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27108,79 +30480,77 @@ func (c *OrganizationsEnvgroupsAttachmentsDeleteCall) Do(opts ...googleapi.CallO } -// method id "apigee.organizations.envgroups.attachments.get": +// method id "apigee.organizations.environments.updateEnvironment": -type OrganizationsEnvgroupsAttachmentsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsUpdateEnvironmentCall struct { + s *Service + name string + googlecloudapigeev1environment *GoogleCloudApigeeV1Environment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets an environment group attachment. +// UpdateEnvironment: Updates an existing environment. When updating +// properties, you must pass all existing properties to the API, even if +// they are not being changed. If you omit properties from the payload, +// the properties are removed. To get the current list of properties for +// the environment, use the Get Environment API (get). **Note**: Both +// `PUT` and `POST` methods are supported for updating an existing +// environment. // -// - name: Name of the environment group attachment in the following -// format: -// `organizations/{org}/envgroups/{envgroup}/attachments/{attachment}`. -func (r *OrganizationsEnvgroupsAttachmentsService) Get(name string) *OrganizationsEnvgroupsAttachmentsGetCall { - c := &OrganizationsEnvgroupsAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the environment. Use the following structure in your +// request: `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsService) UpdateEnvironment(name string, googlecloudapigeev1environment *GoogleCloudApigeeV1Environment) *OrganizationsEnvironmentsUpdateEnvironmentCall { + c := &OrganizationsEnvironmentsUpdateEnvironmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudapigeev1environment = googlecloudapigeev1environment return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvgroupsAttachmentsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsAttachmentsGetCall { +func (c *OrganizationsEnvironmentsUpdateEnvironmentCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsUpdateEnvironmentCall { 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 *OrganizationsEnvgroupsAttachmentsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvgroupsAttachmentsGetCall { - 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 *OrganizationsEnvgroupsAttachmentsGetCall) Context(ctx context.Context) *OrganizationsEnvgroupsAttachmentsGetCall { +func (c *OrganizationsEnvironmentsUpdateEnvironmentCall) Context(ctx context.Context) *OrganizationsEnvironmentsUpdateEnvironmentCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvgroupsAttachmentsGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsUpdateEnvironmentCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvgroupsAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsUpdateEnvironmentCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1environment) + 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -27191,16 +30561,14 @@ func (c *OrganizationsEnvgroupsAttachmentsGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.envgroups.attachments.get" call. -// Exactly one of *GoogleCloudApigeeV1EnvironmentGroupAttachment or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1EnvironmentGroupAttachment.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 *OrganizationsEnvgroupsAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1EnvironmentGroupAttachment, error) { +// Do executes the "apigee.organizations.environments.updateEnvironment" call. +// Exactly one of *GoogleCloudApigeeV1Environment or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Environment.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 *OrganizationsEnvironmentsUpdateEnvironmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Environment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27219,7 +30587,7 @@ func (c *OrganizationsEnvgroupsAttachmentsGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1EnvironmentGroupAttachment{ + ret := &GoogleCloudApigeeV1Environment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27231,25 +30599,28 @@ func (c *OrganizationsEnvgroupsAttachmentsGetCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Gets an environment group attachment.", - // "flatPath": "v1/organizations/{organizationsId}/envgroups/{envgroupsId}/attachments/{attachmentsId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.envgroups.attachments.get", + // "description": "Updates an existing environment. When updating properties, you must pass all existing properties to the API, even if they are not being changed. If you omit properties from the payload, the properties are removed. To get the current list of properties for the environment, use the [Get Environment API](get). **Note**: Both `PUT` and `POST` methods are supported for updating an existing environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.updateEnvironment", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the environment group attachment in the following format: `organizations/{org}/envgroups/{envgroup}/attachments/{attachment}`", + // "description": "Required. Name of the environment. Use the following structure in your request: `organizations/{org}/environments/{env}`", // "location": "path", - // "pattern": "^organizations/[^/]+/envgroups/[^/]+/attachments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1Environment" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1EnvironmentGroupAttachment" + // "$ref": "GoogleCloudApigeeV1Environment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27258,115 +30629,99 @@ func (c *OrganizationsEnvgroupsAttachmentsGetCall) Do(opts ...googleapi.CallOpti } -// method id "apigee.organizations.envgroups.attachments.list": +// method id "apigee.organizations.environments.updateTraceConfig": -type OrganizationsEnvgroupsAttachmentsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsUpdateTraceConfigCall struct { + s *Service + name string + googlecloudapigeev1traceconfig *GoogleCloudApigeeV1TraceConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all attachments of an environment group. +// UpdateTraceConfig: Updates the trace configurations in an +// environment. Note that the repeated fields have replace semantics +// when included in the field mask and that they will be overwritten by +// the value of the fields in the request body. // -// - parent: Name of the environment group in the following format: -// `organizations/{org}/envgroups/{envgroup}`. -func (r *OrganizationsEnvgroupsAttachmentsService) List(parent string) *OrganizationsEnvgroupsAttachmentsListCall { - c := &OrganizationsEnvgroupsAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// environment group attachments to return. The page size defaults to -// 25. -func (c *OrganizationsEnvgroupsAttachmentsListCall) PageSize(pageSize int64) *OrganizationsEnvgroupsAttachmentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - name: Name of the trace configuration. Use the following structure +// in your request: "organizations/*/environments/*/traceConfig". +func (r *OrganizationsEnvironmentsService) UpdateTraceConfig(name string, googlecloudapigeev1traceconfig *GoogleCloudApigeeV1TraceConfig) *OrganizationsEnvironmentsUpdateTraceConfigCall { + c := &OrganizationsEnvironmentsUpdateTraceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1traceconfig = googlecloudapigeev1traceconfig return c } -// PageToken sets the optional parameter "pageToken": Page token, -// returned by a previous ListEnvironmentGroupAttachments call, that you -// can use to retrieve the next page. -func (c *OrganizationsEnvgroupsAttachmentsListCall) PageToken(pageToken string) *OrganizationsEnvgroupsAttachmentsListCall { - c.urlParams_.Set("pageToken", pageToken) +// UpdateMask sets the optional parameter "updateMask": List of fields +// to be updated. +func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) UpdateMask(updateMask string) *OrganizationsEnvironmentsUpdateTraceConfigCall { + 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 *OrganizationsEnvgroupsAttachmentsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvgroupsAttachmentsListCall { +func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsUpdateTraceConfigCall { 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 *OrganizationsEnvgroupsAttachmentsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvgroupsAttachmentsListCall { - 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 *OrganizationsEnvgroupsAttachmentsListCall) Context(ctx context.Context) *OrganizationsEnvgroupsAttachmentsListCall { +func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) Context(ctx context.Context) *OrganizationsEnvironmentsUpdateTraceConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvgroupsAttachmentsListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvgroupsAttachmentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1traceconfig) + 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, "v1/{+parent}/attachments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.envgroups.attachments.list" call. -// Exactly one of -// *GoogleCloudApigeeV1ListEnvironmentGroupAttachmentsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListEnvironmentGroupAttachmentsResponse.ServerResp -// onse.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 *OrganizationsEnvgroupsAttachmentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListEnvironmentGroupAttachmentsResponse, error) { +// Do executes the "apigee.organizations.environments.updateTraceConfig" call. +// Exactly one of *GoogleCloudApigeeV1TraceConfig or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1TraceConfig.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 *OrganizationsEnvironmentsUpdateTraceConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TraceConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27385,7 +30740,7 @@ func (c *OrganizationsEnvgroupsAttachmentsListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListEnvironmentGroupAttachmentsResponse{ + ret := &GoogleCloudApigeeV1TraceConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27397,36 +30752,34 @@ func (c *OrganizationsEnvgroupsAttachmentsListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Lists all attachments of an environment group.", - // "flatPath": "v1/organizations/{organizationsId}/envgroups/{envgroupsId}/attachments", - // "httpMethod": "GET", - // "id": "apigee.organizations.envgroups.attachments.list", + // "description": "Updates the trace configurations in an environment. Note that the repeated fields have replace semantics when included in the field mask and that they will be overwritten by the value of the fields in the request body.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig", + // "httpMethod": "PATCH", + // "id": "apigee.organizations.environments.updateTraceConfig", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Maximum number of environment group attachments to return. The page size defaults to 25.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Page token, returned by a previous ListEnvironmentGroupAttachments call, that you can use to retrieve the next page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Name of the environment group in the following format: `organizations/{org}/envgroups/{envgroup}`.", + // "name": { + // "description": "Required. Name of the trace configuration. Use the following structure in your request: \"organizations/*/environments/*/traceConfig\".", // "location": "path", - // "pattern": "^organizations/[^/]+/envgroups/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "List of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/attachments", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1TraceConfig" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ListEnvironmentGroupAttachmentsResponse" + // "$ref": "GoogleCloudApigeeV1TraceConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27435,119 +30788,117 @@ func (c *OrganizationsEnvgroupsAttachmentsListCall) Do(opts ...googleapi.CallOpt } -// 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 *OrganizationsEnvgroupsAttachmentsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListEnvironmentGroupAttachmentsResponse) 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 "apigee.organizations.environments.create": +// method id "apigee.organizations.environments.analytics.admin.getSchemav2": -type OrganizationsEnvironmentsCreateCall struct { - s *Service - parent string - googlecloudapigeev1environment *GoogleCloudApigeeV1Environment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates an environment in an organization. +// GetSchemav2: Gets a list of metrics and dimensions that can be used +// to create analytics queries and reports. Each schema element contains +// the name of the field, its associated type, and a flag indicating +// whether it is a standard or custom field. // -// - parent: Name of the organization in which the environment will be -// created. Use the following structure in your request: -// `organizations/{org}`. -func (r *OrganizationsEnvironmentsService) Create(parent string, googlecloudapigeev1environment *GoogleCloudApigeeV1Environment) *OrganizationsEnvironmentsCreateCall { - c := &OrganizationsEnvironmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1environment = googlecloudapigeev1environment +// - name: Path to the schema. Use the following structure in your +// request: +// `organizations/{org}/environments/{env}/analytics/admin/schemav2`. +func (r *OrganizationsEnvironmentsAnalyticsAdminService) GetSchemav2(name string) *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call { + c := &OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Name sets the optional parameter "name": Name of the environment. -// Alternatively, the name may be specified in the request body in the -// name field. -func (c *OrganizationsEnvironmentsCreateCall) Name(name string) *OrganizationsEnvironmentsCreateCall { - c.urlParams_.Set("name", name) +// DisableCache sets the optional parameter "disableCache": Flag that +// specifies whether the schema is be read from the database or cache. +// Set to `true` to read the schema from the database. Defaults to +// cache. +func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) DisableCache(disableCache bool) *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call { + c.urlParams_.Set("disableCache", fmt.Sprint(disableCache)) + return c +} + +// Type sets the optional parameter "type": Required. Name of the +// dataset for which you want to retrieve the schema. For example: +// `fact` or `agg_cus1` +func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) Type(type_ string) *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call { + 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 *OrganizationsEnvironmentsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsCreateCall { +func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call { 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 *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call { + 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 *OrganizationsEnvironmentsCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsCreateCall { +func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) Context(ctx context.Context) *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1environment) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/environments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Do executes the "apigee.organizations.environments.analytics.admin.getSchemav2" call. +// Exactly one of *GoogleCloudApigeeV1Schema 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 +// *GoogleCloudApigeeV1Schema.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 *OrganizationsEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Schema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27566,7 +30917,7 @@ func (c *OrganizationsEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1Schema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27578,33 +30929,35 @@ func (c *OrganizationsEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Creates an environment in an organization.", - // "flatPath": "v1/organizations/{organizationsId}/environments", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.create", + // "description": "Gets a list of metrics and dimensions that can be used to create analytics queries and reports. Each schema element contains the name of the field, its associated type, and a flag indicating whether it is a standard or custom field.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/analytics/admin/schemav2", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.analytics.admin.getSchemav2", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "name": { - // "description": "Optional. Name of the environment. Alternatively, the name may be specified in the request body in the name field.", + // "disableCache": { + // "description": "Flag that specifies whether the schema is be read from the database or cache. Set to `true` to read the schema from the database. Defaults to cache.", // "location": "query", - // "type": "string" + // "type": "boolean" // }, - // "parent": { - // "description": "Required. Name of the organization in which the environment will be created. Use the following structure in your request: `organizations/{org}`", + // "name": { + // "description": "Required. Path to the schema. Use the following structure in your request: `organizations/{org}/environments/{env}/analytics/admin/schemav2`.", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/analytics/admin/schemav2$", // "required": true, // "type": "string" + // }, + // "type": { + // "description": "Required. Name of the dataset for which you want to retrieve the schema. For example: `fact` or `agg_cus1`", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/environments", - // "request": { - // "$ref": "GoogleCloudApigeeV1Environment" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1Schema" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27613,32 +30966,35 @@ func (c *OrganizationsEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) ( } -// method id "apigee.organizations.environments.delete": +// method id "apigee.organizations.environments.analytics.exports.create": -type OrganizationsEnvironmentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsAnalyticsExportsCreateCall struct { + s *Service + parent string + googlecloudapigeev1exportrequest *GoogleCloudApigeeV1ExportRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an environment from an organization. **Note**: You -// must delete all key value maps and key value entries before you can -// delete an environment. +// Create: Submit a data export job to be processed in the background. +// If the request is successful, the API returns a 201 status, a URI +// that can be used to retrieve the status of the export job, and the +// `state` value of "enqueued". // -// - name: Name of the environment. Use the following structure in your -// request: `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsService) Delete(name string) *OrganizationsEnvironmentsDeleteCall { - c := &OrganizationsEnvironmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Names of the parent organization and environment. Must be +// of the form `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsAnalyticsExportsService) Create(parent string, googlecloudapigeev1exportrequest *GoogleCloudApigeeV1ExportRequest) *OrganizationsEnvironmentsAnalyticsExportsCreateCall { + c := &OrganizationsEnvironmentsAnalyticsExportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1exportrequest = googlecloudapigeev1exportrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsDeleteCall { +func (c *OrganizationsEnvironmentsAnalyticsExportsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsAnalyticsExportsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27646,21 +31002,21 @@ func (c *OrganizationsEnvironmentsDeleteCall) Fields(s ...googleapi.Field) *Orga // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsDeleteCall { +func (c *OrganizationsEnvironmentsAnalyticsExportsCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsAnalyticsExportsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsAnalyticsExportsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsAnalyticsExportsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27668,29 +31024,34 @@ func (c *OrganizationsEnvironmentsDeleteCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1exportrequest) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/analytics/exports") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Do executes the "apigee.organizations.environments.analytics.exports.create" call. +// Exactly one of *GoogleCloudApigeeV1Export 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 +// *GoogleCloudApigeeV1Export.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 *OrganizationsEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsEnvironmentsAnalyticsExportsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Export, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27709,7 +31070,7 @@ func (c *OrganizationsEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1Export{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27721,25 +31082,28 @@ func (c *OrganizationsEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Deletes an environment from an organization. **Note**: You must delete all key value maps and key value entries before you can delete an environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.delete", + // "description": "Submit a data export job to be processed in the background. If the request is successful, the API returns a 201 status, a URI that can be used to retrieve the status of the export job, and the `state` value of \"enqueued\".", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/analytics/exports", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.analytics.exports.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the environment. Use the following structure in your request: `organizations/{org}/environments/{env}`", + // "parent": { + // "description": "Required. Names of the parent organization and environment. Must be of the form `organizations/{org}/environments/{env}`.", // "location": "path", // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/analytics/exports", + // "request": { + // "$ref": "GoogleCloudApigeeV1ExportRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1Export" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27748,9 +31112,9 @@ func (c *OrganizationsEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) ( } -// method id "apigee.organizations.environments.get": +// method id "apigee.organizations.environments.analytics.exports.get": -type OrganizationsEnvironmentsGetCall struct { +type OrganizationsEnvironmentsAnalyticsExportsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -27759,12 +31123,15 @@ type OrganizationsEnvironmentsGetCall struct { header_ http.Header } -// Get: Gets environment details. +// Get: Gets the details and status of an analytics export job. If the +// export job is still in progress, its `state` is set to "running". +// After the export job has completed successfully, its `state` is set +// to "completed". If the export job fails, its `state` is set to +// `failed`. // -// - name: Name of the environment. Use the following structure in your -// request: `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsService) Get(name string) *OrganizationsEnvironmentsGetCall { - c := &OrganizationsEnvironmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the export to get. +func (r *OrganizationsEnvironmentsAnalyticsExportsService) Get(name string) *OrganizationsEnvironmentsAnalyticsExportsGetCall { + c := &OrganizationsEnvironmentsAnalyticsExportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -27772,7 +31139,7 @@ func (r *OrganizationsEnvironmentsService) Get(name string) *OrganizationsEnviro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsGetCall { +func (c *OrganizationsEnvironmentsAnalyticsExportsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsAnalyticsExportsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27782,7 +31149,7 @@ func (c *OrganizationsEnvironmentsGetCall) Fields(s ...googleapi.Field) *Organiz // 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 *OrganizationsEnvironmentsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsGetCall { +func (c *OrganizationsEnvironmentsAnalyticsExportsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsAnalyticsExportsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -27790,21 +31157,21 @@ func (c *OrganizationsEnvironmentsGetCall) IfNoneMatch(entityTag string) *Organi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsGetCall { +func (c *OrganizationsEnvironmentsAnalyticsExportsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsAnalyticsExportsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsAnalyticsExportsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsAnalyticsExportsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27830,14 +31197,14 @@ func (c *OrganizationsEnvironmentsGetCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.get" call. -// Exactly one of *GoogleCloudApigeeV1Environment or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Environment.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.environments.analytics.exports.get" call. +// Exactly one of *GoogleCloudApigeeV1Export or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1Export.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 *OrganizationsEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Environment, error) { +func (c *OrganizationsEnvironmentsAnalyticsExportsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Export, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27856,7 +31223,7 @@ func (c *OrganizationsEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Environment{ + ret := &GoogleCloudApigeeV1Export{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27868,25 +31235,25 @@ func (c *OrganizationsEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Gets environment details.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}", + // "description": "Gets the details and status of an analytics export job. If the export job is still in progress, its `state` is set to \"running\". After the export job has completed successfully, its `state` is set to \"completed\". If the export job fails, its `state` is set to `failed`.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/analytics/exports/{exportsId}", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.get", + // "id": "apigee.organizations.environments.analytics.exports.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the environment. Use the following structure in your request: `organizations/{org}/environments/{env}`", + // "description": "Required. Resource name of the export to get.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/analytics/exports/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Environment" + // "$ref": "GoogleCloudApigeeV1Export" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27895,32 +31262,32 @@ func (c *OrganizationsEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "apigee.organizations.environments.getDebugmask": +// method id "apigee.organizations.environments.analytics.exports.list": -type OrganizationsEnvironmentsGetDebugmaskCall struct { +type OrganizationsEnvironmentsAnalyticsExportsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetDebugmask: Gets the debug mask singleton resource for an -// environment. +// List: Lists the details and status of all analytics export jobs +// belonging to the parent organization and environment. // -// - name: Name of the debug mask. Use the following structure in your -// request: `organizations/{org}/environments/{env}/debugmask`. -func (r *OrganizationsEnvironmentsService) GetDebugmask(name string) *OrganizationsEnvironmentsGetDebugmaskCall { - c := &OrganizationsEnvironmentsGetDebugmaskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Names of the parent organization and environment. Must be +// of the form `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsAnalyticsExportsService) List(parent string) *OrganizationsEnvironmentsAnalyticsExportsListCall { + c := &OrganizationsEnvironmentsAnalyticsExportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsGetDebugmaskCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsGetDebugmaskCall { +func (c *OrganizationsEnvironmentsAnalyticsExportsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsAnalyticsExportsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27930,7 +31297,7 @@ func (c *OrganizationsEnvironmentsGetDebugmaskCall) Fields(s ...googleapi.Field) // 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 *OrganizationsEnvironmentsGetDebugmaskCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsGetDebugmaskCall { +func (c *OrganizationsEnvironmentsAnalyticsExportsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsAnalyticsExportsListCall { c.ifNoneMatch_ = entityTag return c } @@ -27938,21 +31305,21 @@ func (c *OrganizationsEnvironmentsGetDebugmaskCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsGetDebugmaskCall) Context(ctx context.Context) *OrganizationsEnvironmentsGetDebugmaskCall { +func (c *OrganizationsEnvironmentsAnalyticsExportsListCall) Context(ctx context.Context) *OrganizationsEnvironmentsAnalyticsExportsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsGetDebugmaskCall) Header() http.Header { +func (c *OrganizationsEnvironmentsAnalyticsExportsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsGetDebugmaskCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsAnalyticsExportsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27965,7 +31332,7 @@ func (c *OrganizationsEnvironmentsGetDebugmaskCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/analytics/exports") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27973,19 +31340,20 @@ func (c *OrganizationsEnvironmentsGetDebugmaskCall) doRequest(alt string) (*http } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.getDebugmask" call. -// Exactly one of *GoogleCloudApigeeV1DebugMask or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DebugMask.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 +// Do executes the "apigee.organizations.environments.analytics.exports.list" call. +// Exactly one of *GoogleCloudApigeeV1ListExportsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudApigeeV1ListExportsResponse.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 *OrganizationsEnvironmentsGetDebugmaskCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DebugMask, error) { +func (c *OrganizationsEnvironmentsAnalyticsExportsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListExportsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28004,7 +31372,7 @@ func (c *OrganizationsEnvironmentsGetDebugmaskCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DebugMask{ + ret := &GoogleCloudApigeeV1ListExportsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28016,25 +31384,25 @@ func (c *OrganizationsEnvironmentsGetDebugmaskCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Gets the debug mask singleton resource for an environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/debugmask", + // "description": "Lists the details and status of all analytics export jobs belonging to the parent organization and environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/analytics/exports", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.getDebugmask", + // "id": "apigee.organizations.environments.analytics.exports.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the debug mask. Use the following structure in your request: `organizations/{org}/environments/{env}/debugmask`.", + // "parent": { + // "description": "Required. Names of the parent organization and environment. Must be of the form `organizations/{org}/environments/{env}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/debugmask$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/analytics/exports", // "response": { - // "$ref": "GoogleCloudApigeeV1DebugMask" + // "$ref": "GoogleCloudApigeeV1ListExportsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28043,33 +31411,32 @@ func (c *OrganizationsEnvironmentsGetDebugmaskCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.environments.getDeployedConfig": +// method id "apigee.organizations.environments.apis.deployments.list": -type OrganizationsEnvironmentsGetDeployedConfigCall struct { +type OrganizationsEnvironmentsApisDeploymentsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetDeployedConfig: Gets the deployed configuration for an -// environment. +// List: Lists all deployments of an API proxy in an environment. // -// - name: Name of the environment deployed configuration resource. Use -// the following structure in your request: -// `organizations/{org}/environments/{env}/deployedConfig`. -func (r *OrganizationsEnvironmentsService) GetDeployedConfig(name string) *OrganizationsEnvironmentsGetDeployedConfigCall { - c := &OrganizationsEnvironmentsGetDeployedConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name representing an API proxy in an environment in the +// following format: +// `organizations/{org}/environments/{env}/apis/{api}`. +func (r *OrganizationsEnvironmentsApisDeploymentsService) List(parent string) *OrganizationsEnvironmentsApisDeploymentsListCall { + c := &OrganizationsEnvironmentsApisDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsGetDeployedConfigCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsGetDeployedConfigCall { +func (c *OrganizationsEnvironmentsApisDeploymentsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisDeploymentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28079,7 +31446,7 @@ func (c *OrganizationsEnvironmentsGetDeployedConfigCall) Fields(s ...googleapi.F // 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 *OrganizationsEnvironmentsGetDeployedConfigCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsGetDeployedConfigCall { +func (c *OrganizationsEnvironmentsApisDeploymentsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsApisDeploymentsListCall { c.ifNoneMatch_ = entityTag return c } @@ -28087,21 +31454,21 @@ func (c *OrganizationsEnvironmentsGetDeployedConfigCall) IfNoneMatch(entityTag s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsGetDeployedConfigCall) Context(ctx context.Context) *OrganizationsEnvironmentsGetDeployedConfigCall { +func (c *OrganizationsEnvironmentsApisDeploymentsListCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisDeploymentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsGetDeployedConfigCall) Header() http.Header { +func (c *OrganizationsEnvironmentsApisDeploymentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsGetDeployedConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsApisDeploymentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28114,7 +31481,7 @@ func (c *OrganizationsEnvironmentsGetDeployedConfigCall) doRequest(alt string) ( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28122,20 +31489,21 @@ func (c *OrganizationsEnvironmentsGetDeployedConfigCall) doRequest(alt string) ( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.getDeployedConfig" call. -// Exactly one of *GoogleCloudApigeeV1EnvironmentConfig or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1EnvironmentConfig.ServerResponse.Header or +// Do executes the "apigee.organizations.environments.apis.deployments.list" call. +// Exactly one of *GoogleCloudApigeeV1ListDeploymentsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListDeploymentsResponse.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 *OrganizationsEnvironmentsGetDeployedConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1EnvironmentConfig, error) { +func (c *OrganizationsEnvironmentsApisDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeploymentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28154,7 +31522,7 @@ func (c *OrganizationsEnvironmentsGetDeployedConfigCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1EnvironmentConfig{ + ret := &GoogleCloudApigeeV1ListDeploymentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28166,25 +31534,25 @@ func (c *OrganizationsEnvironmentsGetDeployedConfigCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Gets the deployed configuration for an environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/deployedConfig", + // "description": "Lists all deployments of an API proxy in an environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/deployments", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.getDeployedConfig", + // "id": "apigee.organizations.environments.apis.deployments.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the environment deployed configuration resource. Use the following structure in your request: `organizations/{org}/environments/{env}/deployedConfig`", + // "parent": { + // "description": "Required. Name representing an API proxy in an environment in the following format: `organizations/{org}/environments/{env}/apis/{api}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/deployedConfig$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/deployments", // "response": { - // "$ref": "GoogleCloudApigeeV1EnvironmentConfig" + // "$ref": "GoogleCloudApigeeV1ListDeploymentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28193,120 +31561,135 @@ func (c *OrganizationsEnvironmentsGetDeployedConfigCall) Do(opts ...googleapi.Ca } -// method id "apigee.organizations.environments.getIamPolicy": +// method id "apigee.organizations.environments.apis.revisions.deploy": -type OrganizationsEnvironmentsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsApisRevisionsDeployCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the IAM policy on an environment. For more -// information, see Manage users, roles, and permissions using the API -// (https://cloud.google.com/apigee/docs/api-platform/system-administration/manage-users-roles). -// You must have the `apigee.environments.getIamPolicy` permission to -// call this API. +// Deploy: Deploys a revision of an API proxy. If another revision of +// the same API proxy revision is currently deployed, set the `override` +// parameter to `true` to have this revision replace the currently +// deployed revision. You cannot invoke an API proxy until it has been +// deployed to an environment. After you deploy an API proxy revision, +// you cannot edit it. To edit the API proxy, you must create and deploy +// a new revision. For a request path +// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/dep +// loyments`, two permissions are required: * +// `apigee.deployments.create` on the resource +// `organizations/{org}/environments/{env}` * +// `apigee.proxyrevisions.deploy` on the resource +// `organizations/{org}/apis/{api}/revisions/{rev}` // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *OrganizationsEnvironmentsService) GetIamPolicy(resource string) *OrganizationsEnvironmentsGetIamPolicyCall { - c := &OrganizationsEnvironmentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: Name of the API proxy revision deployment in the following +// format: +// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`. +func (r *OrganizationsEnvironmentsApisRevisionsService) Deploy(name string) *OrganizationsEnvironmentsApisRevisionsDeployCall { + c := &OrganizationsEnvironmentsApisRevisionsDeployCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *OrganizationsEnvironmentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *OrganizationsEnvironmentsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// Override sets the optional parameter "override": Flag that specifies +// whether the new deployment replaces other deployed revisions of the +// API proxy in the environment. Set `override` to `true` to replace +// other deployed revisions. By default, `override` is `false` and the +// deployment is rejected if other revisions of the API proxy are +// deployed in the environment. +func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) Override(override bool) *OrganizationsEnvironmentsApisRevisionsDeployCall { + c.urlParams_.Set("override", fmt.Sprint(override)) + return c +} + +// SequencedRollout sets the optional parameter "sequencedRollout": Flag +// that specifies whether to enable sequenced rollout. If set to `true`, +// the routing rules for this deployment and the environment changes to +// add the deployment will be rolled out in a safe order. This reduces +// the risk of downtime that could be caused by changing the environment +// group's routing before the new destination for the affected traffic +// is ready to receive it. This should only be necessary if the new +// deployment will be capturing traffic from another environment under a +// shared environment group or if traffic will be rerouted to a +// different environment due to a base path removal. The +// GenerateDeployChangeReport API (GenerateDeployChangeReport) may be +// used to examine routing changes before issuing the deployment +// request, and its response will indicate if a sequenced rollout is +// recommended for the deployment. +func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) SequencedRollout(sequencedRollout bool) *OrganizationsEnvironmentsApisRevisionsDeployCall { + c.urlParams_.Set("sequencedRollout", fmt.Sprint(sequencedRollout)) + return c +} + +// ServiceAccount sets the optional parameter "serviceAccount": Google +// Cloud IAM service account. The service account represents the +// identity of the deployed proxy, and determines what permissions it +// has. The format must be +// `{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`. +func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) ServiceAccount(serviceAccount string) *OrganizationsEnvironmentsApisRevisionsDeployCall { + c.urlParams_.Set("serviceAccount", serviceAccount) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsGetIamPolicyCall { +func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDeployCall { 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 *OrganizationsEnvironmentsGetIamPolicyCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsGetIamPolicyCall { - 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 *OrganizationsEnvironmentsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsEnvironmentsGetIamPolicyCall { +func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDeployCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsGetIamPolicyCall) Header() http.Header { +func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/deployments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.getIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.environments.apis.revisions.deploy" call. +// Exactly one of *GoogleCloudApigeeV1Deployment or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Deployment.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 *OrganizationsEnvironmentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Deployment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28325,7 +31708,7 @@ func (c *OrganizationsEnvironmentsGetIamPolicyCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudApigeeV1Deployment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28337,31 +31720,40 @@ func (c *OrganizationsEnvironmentsGetIamPolicyCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Gets the IAM policy on an environment. For more information, see [Manage users, roles, and permissions using the API](https://cloud.google.com/apigee/docs/api-platform/system-administration/manage-users-roles). You must have the `apigee.environments.getIamPolicy` permission to call this API.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.getIamPolicy", + // "description": "Deploys a revision of an API proxy. If another revision of the same API proxy revision is currently deployed, set the `override` parameter to `true` to have this revision replace the currently deployed revision. You cannot invoke an API proxy until it has been deployed to an environment. After you deploy an API proxy revision, you cannot edit it. To edit the API proxy, you must create and deploy a new revision. For a request path `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/deployments`, two permissions are required: * `apigee.deployments.create` on the resource `organizations/{org}/environments/{env}` * `apigee.proxyrevisions.deploy` on the resource `organizations/{org}/apis/{api}/revisions/{rev}` ", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/deployments", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.apis.revisions.deploy", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. Name of the API proxy revision deployment in the following format: `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" + // }, + // "override": { + // "description": "Flag that specifies whether the new deployment replaces other deployed revisions of the API proxy in the environment. Set `override` to `true` to replace other deployed revisions. By default, `override` is `false` and the deployment is rejected if other revisions of the API proxy are deployed in the environment.", + // "location": "query", + // "type": "boolean" + // }, + // "sequencedRollout": { + // "description": "Flag that specifies whether to enable sequenced rollout. If set to `true`, the routing rules for this deployment and the environment changes to add the deployment will be rolled out in a safe order. This reduces the risk of downtime that could be caused by changing the environment group's routing before the new destination for the affected traffic is ready to receive it. This should only be necessary if the new deployment will be capturing traffic from another environment under a shared environment group or if traffic will be rerouted to a different environment due to a base path removal. The [GenerateDeployChangeReport API](GenerateDeployChangeReport) may be used to examine routing changes before issuing the deployment request, and its response will indicate if a sequenced rollout is recommended for the deployment.", + // "location": "query", + // "type": "boolean" + // }, + // "serviceAccount": { + // "description": "Google Cloud IAM service account. The service account represents the identity of the deployed proxy, and determines what permissions it has. The format must be `{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+name}/deployments", // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleCloudApigeeV1Deployment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28370,9 +31762,9 @@ func (c *OrganizationsEnvironmentsGetIamPolicyCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.environments.getTraceConfig": +// method id "apigee.organizations.environments.apis.revisions.getDeployments": -type OrganizationsEnvironmentsGetTraceConfigCall struct { +type OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -28381,13 +31773,14 @@ type OrganizationsEnvironmentsGetTraceConfigCall struct { header_ http.Header } -// GetTraceConfig: Get distributed trace configuration in an -// environment. +// GetDeployments: Gets the deployment of an API proxy revision and +// actual state reported by runtime pods. // -// - name: Name of the trace configuration. Use the following structure -// in your request: "organizations/*/environments/*/traceConfig". -func (r *OrganizationsEnvironmentsService) GetTraceConfig(name string) *OrganizationsEnvironmentsGetTraceConfigCall { - c := &OrganizationsEnvironmentsGetTraceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name representing an API proxy revision in an environment in +// the following format: +// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`. +func (r *OrganizationsEnvironmentsApisRevisionsService) GetDeployments(name string) *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall { + c := &OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -28395,7 +31788,7 @@ func (r *OrganizationsEnvironmentsService) GetTraceConfig(name string) *Organiza // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsGetTraceConfigCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsGetTraceConfigCall { +func (c *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28405,7 +31798,7 @@ func (c *OrganizationsEnvironmentsGetTraceConfigCall) Fields(s ...googleapi.Fiel // 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 *OrganizationsEnvironmentsGetTraceConfigCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsGetTraceConfigCall { +func (c *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall { c.ifNoneMatch_ = entityTag return c } @@ -28413,21 +31806,21 @@ func (c *OrganizationsEnvironmentsGetTraceConfigCall) IfNoneMatch(entityTag stri // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsGetTraceConfigCall) Context(ctx context.Context) *OrganizationsEnvironmentsGetTraceConfigCall { +func (c *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsGetTraceConfigCall) Header() http.Header { +func (c *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsGetTraceConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28440,7 +31833,7 @@ func (c *OrganizationsEnvironmentsGetTraceConfigCall) doRequest(alt string) (*ht var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/deployments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28453,14 +31846,14 @@ func (c *OrganizationsEnvironmentsGetTraceConfigCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.getTraceConfig" call. -// Exactly one of *GoogleCloudApigeeV1TraceConfig or error will be +// Do executes the "apigee.organizations.environments.apis.revisions.getDeployments" call. +// Exactly one of *GoogleCloudApigeeV1Deployment or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1TraceConfig.ServerResponse.Header or (if a +// either *GoogleCloudApigeeV1Deployment.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 *OrganizationsEnvironmentsGetTraceConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TraceConfig, error) { +func (c *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Deployment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28479,7 +31872,7 @@ func (c *OrganizationsEnvironmentsGetTraceConfigCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1TraceConfig{ + ret := &GoogleCloudApigeeV1Deployment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28491,25 +31884,25 @@ func (c *OrganizationsEnvironmentsGetTraceConfigCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Get distributed trace configuration in an environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig", + // "description": "Gets the deployment of an API proxy revision and actual state reported by runtime pods.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/deployments", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.getTraceConfig", + // "id": "apigee.organizations.environments.apis.revisions.getDeployments", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the trace configuration. Use the following structure in your request: \"organizations/*/environments/*/traceConfig\".", + // "description": "Required. Name representing an API proxy revision in an environment in the following format: `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}/deployments", // "response": { - // "$ref": "GoogleCloudApigeeV1TraceConfig" + // "$ref": "GoogleCloudApigeeV1Deployment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28518,39 +31911,54 @@ func (c *OrganizationsEnvironmentsGetTraceConfigCall) Do(opts ...googleapi.CallO } -// method id "apigee.organizations.environments.setIamPolicy": +// method id "apigee.organizations.environments.apis.revisions.undeploy": -type OrganizationsEnvironmentsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsApisRevisionsUndeployCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the IAM policy on an environment, if the policy -// already exists it will be replaced. For more information, see Manage -// users, roles, and permissions using the API -// (https://cloud.google.com/apigee/docs/api-platform/system-administration/manage-users-roles). -// You must have the `apigee.environments.setIamPolicy` permission to -// call this API. +// Undeploy: Undeploys an API proxy revision from an environment. For a +// request path +// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/dep +// loyments`, two permissions are required: * +// `apigee.deployments.delete` on the resource +// `organizations/{org}/environments/{env}` * +// `apigee.proxyrevisions.undeploy` on the resource +// `organizations/{org}/apis/{api}/revisions/{rev}` // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *OrganizationsEnvironmentsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *OrganizationsEnvironmentsSetIamPolicyCall { - c := &OrganizationsEnvironmentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: Name of the API proxy revision deployment in the following +// format: +// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`. +func (r *OrganizationsEnvironmentsApisRevisionsService) Undeploy(name string) *OrganizationsEnvironmentsApisRevisionsUndeployCall { + c := &OrganizationsEnvironmentsApisRevisionsUndeployCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// SequencedRollout sets the optional parameter "sequencedRollout": Flag +// that specifies whether to enable sequenced rollout. If set to `true`, +// the environment group routing rules corresponding to this deployment +// will be removed before removing the deployment from the runtime. This +// is likely to be a rare use case; it is only needed when the intended +// effect of undeploying this proxy is to cause the traffic it currently +// handles to be rerouted to some other existing proxy in the +// environment group. The GenerateUndeployChangeReport API +// (GenerateUndeployChangeReport) may be used to examine routing changes +// before issuing the undeployment request, and its response will +// indicate if a sequenced rollout is recommended for the undeployment. +func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) SequencedRollout(sequencedRollout bool) *OrganizationsEnvironmentsApisRevisionsUndeployCall { + c.urlParams_.Set("sequencedRollout", fmt.Sprint(sequencedRollout)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSetIamPolicyCall { +func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsUndeployCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28558,21 +31966,21 @@ func (c *OrganizationsEnvironmentsSetIamPolicyCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsEnvironmentsSetIamPolicyCall { +func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsUndeployCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsSetIamPolicyCall) Header() http.Header { +func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28580,34 +31988,29 @@ func (c *OrganizationsEnvironmentsSetIamPolicyCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - 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, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/deployments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.setIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// Do executes the "apigee.organizations.environments.apis.revisions.undeploy" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// *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 *OrganizationsEnvironmentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28626,7 +32029,7 @@ func (c *OrganizationsEnvironmentsSetIamPolicyCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28638,28 +32041,30 @@ func (c *OrganizationsEnvironmentsSetIamPolicyCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Sets the IAM policy on an environment, if the policy already exists it will be replaced. For more information, see [Manage users, roles, and permissions using the API](https://cloud.google.com/apigee/docs/api-platform/system-administration/manage-users-roles). You must have the `apigee.environments.setIamPolicy` permission to call this API.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.setIamPolicy", + // "description": "Undeploys an API proxy revision from an environment. For a request path `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/deployments`, two permissions are required: * `apigee.deployments.delete` on the resource `organizations/{org}/environments/{env}` * `apigee.proxyrevisions.undeploy` on the resource `organizations/{org}/apis/{api}/revisions/{rev}`", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/deployments", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.environments.apis.revisions.undeploy", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. Name of the API proxy revision deployment in the following format: `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" + // }, + // "sequencedRollout": { + // "description": "Flag that specifies whether to enable sequenced rollout. If set to `true`, the environment group routing rules corresponding to this deployment will be removed before removing the deployment from the runtime. This is likely to be a rare use case; it is only needed when the intended effect of undeploying this proxy is to cause the traffic it currently handles to be rerouted to some other existing proxy in the environment group. The [GenerateUndeployChangeReport API](GenerateUndeployChangeReport) may be used to examine routing changes before issuing the undeployment request, and its response will indicate if a sequenced rollout is recommended for the undeployment.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "GoogleIamV1SetIamPolicyRequest" - // }, + // "path": "v1/{+name}/deployments", // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28668,32 +32073,42 @@ func (c *OrganizationsEnvironmentsSetIamPolicyCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.environments.subscribe": +// method id "apigee.organizations.environments.apis.revisions.debugsessions.create": -type OrganizationsEnvironmentsSubscribeCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall struct { + s *Service + parent string + googlecloudapigeev1debugsession *GoogleCloudApigeeV1DebugSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Subscribe: Creates a subscription for the environment's Pub/Sub -// topic. The server will assign a random name for this subscription. -// The "name" and "push_config" must *not* be specified. +// Create: Creates a debug session for a deployed API Proxy revision. // -// - parent: Name of the environment. Use the following structure in -// your request: `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsService) Subscribe(parent string) *OrganizationsEnvironmentsSubscribeCall { - c := &OrganizationsEnvironmentsSubscribeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the API Proxy revision deployment for +// which to create the DebugSession. Must be of the form +// `organizations/{organization}/environments/{environment}/apis/{api}/ +// revisions/{revision}`. +func (r *OrganizationsEnvironmentsApisRevisionsDebugsessionsService) Create(parent string, googlecloudapigeev1debugsession *GoogleCloudApigeeV1DebugSession) *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall { + c := &OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.googlecloudapigeev1debugsession = googlecloudapigeev1debugsession + return c +} + +// Timeout sets the optional parameter "timeout": The time in seconds +// after which this DebugSession should end. A timeout specified in +// DebugSession will overwrite this value. +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) Timeout(timeout int64) *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall { + c.urlParams_.Set("timeout", fmt.Sprint(timeout)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsSubscribeCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSubscribeCall { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28701,21 +32116,21 @@ func (c *OrganizationsEnvironmentsSubscribeCall) Fields(s ...googleapi.Field) *O // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsSubscribeCall) Context(ctx context.Context) *OrganizationsEnvironmentsSubscribeCall { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsSubscribeCall) Header() http.Header { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsSubscribeCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28723,9 +32138,14 @@ func (c *OrganizationsEnvironmentsSubscribeCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1debugsession) + 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, "v1/{+parent}:subscribe") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/debugsessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -28738,14 +32158,14 @@ func (c *OrganizationsEnvironmentsSubscribeCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.subscribe" call. -// Exactly one of *GoogleCloudApigeeV1Subscription or error will be +// Do executes the "apigee.organizations.environments.apis.revisions.debugsessions.create" call. +// Exactly one of *GoogleCloudApigeeV1DebugSession or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Subscription.ServerResponse.Header or (if +// either *GoogleCloudApigeeV1DebugSession.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 *OrganizationsEnvironmentsSubscribeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Subscription, error) { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DebugSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28764,7 +32184,7 @@ func (c *OrganizationsEnvironmentsSubscribeCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Subscription{ + ret := &GoogleCloudApigeeV1DebugSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28776,25 +32196,34 @@ func (c *OrganizationsEnvironmentsSubscribeCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Creates a subscription for the environment's Pub/Sub topic. The server will assign a random name for this subscription. The \"name\" and \"push_config\" must *not* be specified.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}:subscribe", + // "description": "Creates a debug session for a deployed API Proxy revision.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/debugsessions", // "httpMethod": "POST", - // "id": "apigee.organizations.environments.subscribe", + // "id": "apigee.organizations.environments.apis.revisions.debugsessions.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Name of the environment. Use the following structure in your request: `organizations/{org}/environments/{env}`", + // "description": "Required. The resource name of the API Proxy revision deployment for which to create the DebugSession. Must be of the form `organizations/{organization}/environments/{environment}/apis/{api}/revisions/{revision}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" + // }, + // "timeout": { + // "description": "Optional. The time in seconds after which this DebugSession should end. A timeout specified in DebugSession will overwrite this value.", + // "format": "int64", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}:subscribe", + // "path": "v1/{+parent}/debugsessions", + // "request": { + // "$ref": "GoogleCloudApigeeV1DebugSession" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Subscription" + // "$ref": "GoogleCloudApigeeV1DebugSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28803,37 +32232,33 @@ func (c *OrganizationsEnvironmentsSubscribeCall) Do(opts ...googleapi.CallOption } -// method id "apigee.organizations.environments.testIamPermissions": +// method id "apigee.organizations.environments.apis.revisions.debugsessions.deleteData": -type OrganizationsEnvironmentsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Tests the permissions of a user on an -// environment, and returns a subset of permissions that the user has on -// the environment. If the environment does not exist, an empty -// permission set is returned (a NOT_FOUND error is not returned). +// DeleteData: Deletes the data from a debug session. This does not +// cancel the debug session or prevent further data from being collected +// if the session is still active in runtime pods. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *OrganizationsEnvironmentsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *OrganizationsEnvironmentsTestIamPermissionsCall { - c := &OrganizationsEnvironmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - name: The name of the debug session to delete. Must be of the form: +// `organizations/{organization}/environments/{environment}/apis/{api}/ +// revisions/{revision}/debugsessions/{debugsession}`. +func (r *OrganizationsEnvironmentsApisRevisionsDebugsessionsService) DeleteData(name string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall { + c := &OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall{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 *OrganizationsEnvironmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTestIamPermissionsCall { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28841,21 +32266,21 @@ func (c *OrganizationsEnvironmentsTestIamPermissionsCall) Fields(s ...googleapi. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsEnvironmentsTestIamPermissionsCall { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsTestIamPermissionsCall) Header() http.Header { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28863,35 +32288,29 @@ func (c *OrganizationsEnvironmentsTestIamPermissionsCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - 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, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/data") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.testIamPermissions" call. -// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.environments.apis.revisions.debugsessions.deleteData" 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 *OrganizationsEnvironmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28910,7 +32329,7 @@ func (c *OrganizationsEnvironmentsTestIamPermissionsCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28921,29 +32340,26 @@ func (c *OrganizationsEnvironmentsTestIamPermissionsCall) Do(opts ...googleapi.C return nil, err } return ret, nil - // { - // "description": "Tests the permissions of a user on an environment, and returns a subset of permissions that the user has on the environment. If the environment does not exist, an empty permission set is returned (a NOT_FOUND error is not returned).", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.testIamPermissions", + // { + // "description": "Deletes the data from a debug session. This does not cancel the debug session or prevent further data from being collected if the session is still active in runtime pods.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/debugsessions/{debugsessionsId}/data", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.environments.apis.revisions.debugsessions.deleteData", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. The name of the debug session to delete. Must be of the form: `organizations/{organization}/environments/{environment}/apis/{api}/revisions/{revision}/debugsessions/{debugsession}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+/debugsessions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" - // }, + // "path": "v1/{+name}/data", // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28952,90 +32368,98 @@ func (c *OrganizationsEnvironmentsTestIamPermissionsCall) Do(opts ...googleapi.C } -// method id "apigee.organizations.environments.unsubscribe": +// method id "apigee.organizations.environments.apis.revisions.debugsessions.get": -type OrganizationsEnvironmentsUnsubscribeCall struct { - s *Service - parent string - googlecloudapigeev1subscription *GoogleCloudApigeeV1Subscription - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Unsubscribe: Deletes a subscription for the environment's Pub/Sub -// topic. +// Get: Retrieves a debug session. // -// - parent: Name of the environment. Use the following structure in -// your request: `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsService) Unsubscribe(parent string, googlecloudapigeev1subscription *GoogleCloudApigeeV1Subscription) *OrganizationsEnvironmentsUnsubscribeCall { - c := &OrganizationsEnvironmentsUnsubscribeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1subscription = googlecloudapigeev1subscription +// - name: The name of the debug session to retrieve. Must be of the +// form: +// `organizations/{organization}/environments/{environment}/apis/{api}/ +// revisions/{revision}/debugsessions/{session}`. +func (r *OrganizationsEnvironmentsApisRevisionsDebugsessionsService) Get(name string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall { + c := &OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall{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 *OrganizationsEnvironmentsUnsubscribeCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsUnsubscribeCall { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall { 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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall { + 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 *OrganizationsEnvironmentsUnsubscribeCall) Context(ctx context.Context) *OrganizationsEnvironmentsUnsubscribeCall { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsUnsubscribeCall) Header() http.Header { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsUnsubscribeCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1subscription) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:unsubscribe") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.unsubscribe" 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 +// Do executes the "apigee.organizations.environments.apis.revisions.debugsessions.get" call. +// Exactly one of *GoogleCloudApigeeV1DebugSession or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1DebugSession.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 *OrganizationsEnvironmentsUnsubscribeCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DebugSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29054,7 +32478,7 @@ func (c *OrganizationsEnvironmentsUnsubscribeCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudApigeeV1DebugSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29066,28 +32490,25 @@ func (c *OrganizationsEnvironmentsUnsubscribeCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Deletes a subscription for the environment's Pub/Sub topic.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}:unsubscribe", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.unsubscribe", + // "description": "Retrieves a debug session.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/debugsessions/{debugsessionsId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.apis.revisions.debugsessions.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name of the environment. Use the following structure in your request: `organizations/{org}/environments/{env}`", + // "name": { + // "description": "Required. The name of the debug session to retrieve. Must be of the form: `organizations/{organization}/environments/{environment}/apis/{api}/revisions/{revision}/debugsessions/{session}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+/debugsessions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}:unsubscribe", - // "request": { - // "$ref": "GoogleCloudApigeeV1Subscription" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudApigeeV1DebugSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29096,95 +32517,116 @@ func (c *OrganizationsEnvironmentsUnsubscribeCall) Do(opts ...googleapi.CallOpti } -// method id "apigee.organizations.environments.update": +// method id "apigee.organizations.environments.apis.revisions.debugsessions.list": -type OrganizationsEnvironmentsUpdateCall struct { - s *Service - name string - googlecloudapigeev1environment *GoogleCloudApigeeV1Environment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates an existing environment. When updating properties, -// you must pass all existing properties to the API, even if they are -// not being changed. If you omit properties from the payload, the -// properties are removed. To get the current list of properties for the -// environment, use the Get Environment API (get). **Note**: Both `PUT` -// and `POST` methods are supported for updating an existing -// environment. +// List: Lists debug sessions that are currently active in the given API +// Proxy revision. // -// - name: Name of the environment. Use the following structure in your -// request: `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsService) Update(name string, googlecloudapigeev1environment *GoogleCloudApigeeV1Environment) *OrganizationsEnvironmentsUpdateCall { - c := &OrganizationsEnvironmentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1environment = googlecloudapigeev1environment +// - parent: The name of the API Proxy revision deployment for which to +// list debug sessions. Must be of the form: +// `organizations/{organization}/environments/{environment}/apis/{api}/ +// revisions/{revision}`. +func (r *OrganizationsEnvironmentsApisRevisionsDebugsessionsService) List(parent string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall { + c := &OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// debug sessions to return. The page size defaults to 25. +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) PageSize(pageSize int64) *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token, +// returned from a previous ListDebugSessions call, that you can use to +// retrieve the next page. +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) PageToken(pageToken string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall { + 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 *OrganizationsEnvironmentsUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsUpdateCall { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall { 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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall { + 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 *OrganizationsEnvironmentsUpdateCall) Context(ctx context.Context) *OrganizationsEnvironmentsUpdateCall { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsUpdateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1environment) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/debugsessions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.update" call. -// Exactly one of *GoogleCloudApigeeV1Environment or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Environment.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 *OrganizationsEnvironmentsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Environment, error) { +// Do executes the "apigee.organizations.environments.apis.revisions.debugsessions.list" call. +// Exactly one of *GoogleCloudApigeeV1ListDebugSessionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListDebugSessionsResponse.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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDebugSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29203,7 +32645,7 @@ func (c *OrganizationsEnvironmentsUpdateCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Environment{ + ret := &GoogleCloudApigeeV1ListDebugSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29215,28 +32657,36 @@ func (c *OrganizationsEnvironmentsUpdateCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Updates an existing environment. When updating properties, you must pass all existing properties to the API, even if they are not being changed. If you omit properties from the payload, the properties are removed. To get the current list of properties for the environment, use the [Get Environment API](get). **Note**: Both `PUT` and `POST` methods are supported for updating an existing environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}", - // "httpMethod": "PUT", - // "id": "apigee.organizations.environments.update", + // "description": "Lists debug sessions that are currently active in the given API Proxy revision.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/debugsessions", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.apis.revisions.debugsessions.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the environment. Use the following structure in your request: `organizations/{org}/environments/{env}`", + // "pageSize": { + // "description": "Maximum number of debug sessions to return. The page size defaults to 25.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token, returned from a previous ListDebugSessions call, that you can use to retrieve the next page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the API Proxy revision deployment for which to list debug sessions. Must be of the form: `organizations/{organization}/environments/{environment}/apis/{api}/revisions/{revision}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1Environment" - // }, + // "path": "v1/{+parent}/debugsessions", // "response": { - // "$ref": "GoogleCloudApigeeV1Environment" + // "$ref": "GoogleCloudApigeeV1ListDebugSessionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29245,88 +32695,101 @@ func (c *OrganizationsEnvironmentsUpdateCall) Do(opts ...googleapi.CallOption) ( } -// method id "apigee.organizations.environments.updateDebugmask": - -type OrganizationsEnvironmentsUpdateDebugmaskCall struct { - s *Service - name string - googlecloudapigeev1debugmask *GoogleCloudApigeeV1DebugMask - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListDebugSessionsResponse) 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) + } } -// UpdateDebugmask: Updates the debug mask singleton resource for an -// environment. -// -// - name: Name of the debug mask. -func (r *OrganizationsEnvironmentsService) UpdateDebugmask(name string, googlecloudapigeev1debugmask *GoogleCloudApigeeV1DebugMask) *OrganizationsEnvironmentsUpdateDebugmaskCall { - c := &OrganizationsEnvironmentsUpdateDebugmaskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1debugmask = googlecloudapigeev1debugmask - return c -} +// method id "apigee.organizations.environments.apis.revisions.debugsessions.data.get": -// ReplaceRepeatedFields sets the optional parameter -// "replaceRepeatedFields": Boolean flag that specifies whether to -// replace existing values in the debug mask when doing an update. Set -// to true to replace existing values. The default behavior is to append -// the values (false). -func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) ReplaceRepeatedFields(replaceRepeatedFields bool) *OrganizationsEnvironmentsUpdateDebugmaskCall { - c.urlParams_.Set("replaceRepeatedFields", fmt.Sprint(replaceRepeatedFields)) - return c +type OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateMask sets the optional parameter "updateMask": Field debug mask -// to support partial updates. -func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) UpdateMask(updateMask string) *OrganizationsEnvironmentsUpdateDebugmaskCall { - c.urlParams_.Set("updateMask", updateMask) +// Get: Gets the debug data from a transaction. +// +// - name: The name of the debug session transaction. Must be of the +// form: +// `organizations/{organization}/environments/{environment}/apis/{api}/ +// revisions/{revision}/debugsessions/{session}/data/{transaction}`. +func (r *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataService) Get(name string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall { + c := &OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall{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 *OrganizationsEnvironmentsUpdateDebugmaskCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsUpdateDebugmaskCall { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall { 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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall { + 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 *OrganizationsEnvironmentsUpdateDebugmaskCall) Context(ctx context.Context) *OrganizationsEnvironmentsUpdateDebugmaskCall { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) Header() http.Header { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1debugmask) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -29337,14 +32800,16 @@ func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.updateDebugmask" call. -// Exactly one of *GoogleCloudApigeeV1DebugMask or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DebugMask.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 *OrganizationsEnvironmentsUpdateDebugmaskCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DebugMask, error) { +// Do executes the "apigee.organizations.environments.apis.revisions.debugsessions.data.get" call. +// Exactly one of *GoogleCloudApigeeV1DebugSessionTransaction or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1DebugSessionTransaction.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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DebugSessionTransaction, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29363,7 +32828,7 @@ func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DebugMask{ + ret := &GoogleCloudApigeeV1DebugSessionTransaction{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29375,39 +32840,25 @@ func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Updates the debug mask singleton resource for an environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/debugmask", - // "httpMethod": "PATCH", - // "id": "apigee.organizations.environments.updateDebugmask", + // "description": "Gets the debug data from a transaction.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/debugsessions/{debugsessionsId}/data/{dataId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.apis.revisions.debugsessions.data.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Name of the debug mask.", + // "description": "Required. The name of the debug session transaction. Must be of the form: `organizations/{organization}/environments/{environment}/apis/{api}/revisions/{revision}/debugsessions/{session}/data/{transaction}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/debugmask$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+/debugsessions/[^/]+/data/[^/]+$", // "required": true, // "type": "string" - // }, - // "replaceRepeatedFields": { - // "description": "Boolean flag that specifies whether to replace existing values in the debug mask when doing an update. Set to true to replace existing values. The default behavior is to append the values (false).", - // "location": "query", - // "type": "boolean" - // }, - // "updateMask": { - // "description": "Field debug mask to support partial updates.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1DebugMask" - // }, // "response": { - // "$ref": "GoogleCloudApigeeV1DebugMask" + // "$ref": "GoogleCloudApigeeV1DebugSessionTransaction" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29416,38 +32867,52 @@ func (c *OrganizationsEnvironmentsUpdateDebugmaskCall) Do(opts ...googleapi.Call } -// method id "apigee.organizations.environments.updateEnvironment": +// method id "apigee.organizations.environments.apis.revisions.deployments.generateDeployChangeReport": -type OrganizationsEnvironmentsUpdateEnvironmentCall struct { - s *Service - name string - googlecloudapigeev1environment *GoogleCloudApigeeV1Environment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateEnvironment: Updates an existing environment. When updating -// properties, you must pass all existing properties to the API, even if -// they are not being changed. If you omit properties from the payload, -// the properties are removed. To get the current list of properties for -// the environment, use the Get Environment API (get). **Note**: Both -// `PUT` and `POST` methods are supported for updating an existing -// environment. +// GenerateDeployChangeReport: Generates a report for a dry run analysis +// of a DeployApiProxy request without committing the deployment. In +// addition to the standard validations performed when adding +// deployments, additional analysis will be done to detect possible +// traffic routing changes that would result from this deployment being +// created. Any potential routing conflicts or unsafe changes will be +// reported in the response. This routing analysis is not performed for +// a non-dry-run DeployApiProxy request. For a request path +// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/dep +// loyments:generateDeployChangeReport`, two permissions are required: * +// `apigee.deployments.create` on the resource +// `organizations/{org}/environments/{env}` * +// `apigee.proxyrevisions.deploy` on the resource +// `organizations/{org}/apis/{api}/revisions/{rev}` // -// - name: Name of the environment. Use the following structure in your -// request: `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsService) UpdateEnvironment(name string, googlecloudapigeev1environment *GoogleCloudApigeeV1Environment) *OrganizationsEnvironmentsUpdateEnvironmentCall { - c := &OrganizationsEnvironmentsUpdateEnvironmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the API proxy revision deployment in the following +// format: +// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`. +func (r *OrganizationsEnvironmentsApisRevisionsDeploymentsService) GenerateDeployChangeReport(name string) *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall { + c := &OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1environment = googlecloudapigeev1environment + return c +} + +// Override sets the optional parameter "override": Flag that specifies +// whether to force the deployment of the new revision over the +// currently deployed revision by overriding conflict checks. +func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall) Override(override bool) *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall { + c.urlParams_.Set("override", fmt.Sprint(override)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsUpdateEnvironmentCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsUpdateEnvironmentCall { +func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29455,21 +32920,21 @@ func (c *OrganizationsEnvironmentsUpdateEnvironmentCall) Fields(s ...googleapi.F // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsUpdateEnvironmentCall) Context(ctx context.Context) *OrganizationsEnvironmentsUpdateEnvironmentCall { +func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsUpdateEnvironmentCall) Header() http.Header { +func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsUpdateEnvironmentCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29477,14 +32942,9 @@ func (c *OrganizationsEnvironmentsUpdateEnvironmentCall) doRequest(alt string) ( } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1environment) - 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/deployments:generateDeployChangeReport") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29497,14 +32957,16 @@ func (c *OrganizationsEnvironmentsUpdateEnvironmentCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.updateEnvironment" call. -// Exactly one of *GoogleCloudApigeeV1Environment or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Environment.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 *OrganizationsEnvironmentsUpdateEnvironmentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Environment, error) { +// Do executes the "apigee.organizations.environments.apis.revisions.deployments.generateDeployChangeReport" call. +// Exactly one of *GoogleCloudApigeeV1DeploymentChangeReport or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1DeploymentChangeReport.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 *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeploymentChangeReport, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29523,7 +32985,7 @@ func (c *OrganizationsEnvironmentsUpdateEnvironmentCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Environment{ + ret := &GoogleCloudApigeeV1DeploymentChangeReport{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29535,28 +32997,30 @@ func (c *OrganizationsEnvironmentsUpdateEnvironmentCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Updates an existing environment. When updating properties, you must pass all existing properties to the API, even if they are not being changed. If you omit properties from the payload, the properties are removed. To get the current list of properties for the environment, use the [Get Environment API](get). **Note**: Both `PUT` and `POST` methods are supported for updating an existing environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}", + // "description": "Generates a report for a dry run analysis of a DeployApiProxy request without committing the deployment. In addition to the standard validations performed when adding deployments, additional analysis will be done to detect possible traffic routing changes that would result from this deployment being created. Any potential routing conflicts or unsafe changes will be reported in the response. This routing analysis is not performed for a non-dry-run DeployApiProxy request. For a request path `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/deployments:generateDeployChangeReport`, two permissions are required: * `apigee.deployments.create` on the resource `organizations/{org}/environments/{env}` * `apigee.proxyrevisions.deploy` on the resource `organizations/{org}/apis/{api}/revisions/{rev}`", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/deployments:generateDeployChangeReport", // "httpMethod": "POST", - // "id": "apigee.organizations.environments.updateEnvironment", + // "id": "apigee.organizations.environments.apis.revisions.deployments.generateDeployChangeReport", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the environment. Use the following structure in your request: `organizations/{org}/environments/{env}`", + // "description": "Name of the API proxy revision deployment in the following format: `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1Environment" + // }, + // "override": { + // "description": "Flag that specifies whether to force the deployment of the new revision over the currently deployed revision by overriding conflict checks.", + // "location": "query", + // "type": "boolean" + // } // }, + // "path": "v1/{+name}/deployments:generateDeployChangeReport", // "response": { - // "$ref": "GoogleCloudApigeeV1Environment" + // "$ref": "GoogleCloudApigeeV1DeploymentChangeReport" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29565,42 +33029,45 @@ func (c *OrganizationsEnvironmentsUpdateEnvironmentCall) Do(opts ...googleapi.Ca } -// method id "apigee.organizations.environments.updateTraceConfig": +// method id "apigee.organizations.environments.apis.revisions.deployments.generateUndeployChangeReport": -type OrganizationsEnvironmentsUpdateTraceConfigCall struct { - s *Service - name string - googlecloudapigeev1traceconfig *GoogleCloudApigeeV1TraceConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateTraceConfig: Updates the trace configurations in an -// environment. Note that the repeated fields have replace semantics -// when included in the field mask and that they will be overwritten by -// the value of the fields in the request body. +// GenerateUndeployChangeReport: Generates a report for a dry run +// analysis of an UndeployApiProxy request without committing the +// undeploy. In addition to the standard validations performed when +// removing deployments, additional analysis will be done to detect +// possible traffic routing changes that would result from this +// deployment being removed. Any potential routing conflicts or unsafe +// changes will be reported in the response. This routing analysis is +// not performed for a non-dry-run UndeployApiProxy request. For a +// request path +// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/dep +// loyments:generateUndeployChangeReport`, two permissions are required: +// * `apigee.deployments.delete` on the resource +// `organizations/{org}/environments/{env}` * +// `apigee.proxyrevisions.undeploy` on the resource +// `organizations/{org}/apis/{api}/revisions/{rev}` // -// - name: Name of the trace configuration. Use the following structure -// in your request: "organizations/*/environments/*/traceConfig". -func (r *OrganizationsEnvironmentsService) UpdateTraceConfig(name string, googlecloudapigeev1traceconfig *GoogleCloudApigeeV1TraceConfig) *OrganizationsEnvironmentsUpdateTraceConfigCall { - c := &OrganizationsEnvironmentsUpdateTraceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the API proxy revision deployment in the following +// format: +// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`. +func (r *OrganizationsEnvironmentsApisRevisionsDeploymentsService) GenerateUndeployChangeReport(name string) *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall { + c := &OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1traceconfig = googlecloudapigeev1traceconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": List of fields -// to be updated. -func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) UpdateMask(updateMask string) *OrganizationsEnvironmentsUpdateTraceConfigCall { - 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 *OrganizationsEnvironmentsUpdateTraceConfigCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsUpdateTraceConfigCall { +func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29608,21 +33075,21 @@ func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) Fields(s ...googleapi.F // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) Context(ctx context.Context) *OrganizationsEnvironmentsUpdateTraceConfigCall { +func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) Header() http.Header { +func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29630,16 +33097,11 @@ func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) doRequest(alt string) ( } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1traceconfig) - 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/deployments:generateUndeployChangeReport") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -29650,14 +33112,16 @@ func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.updateTraceConfig" call. -// Exactly one of *GoogleCloudApigeeV1TraceConfig or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1TraceConfig.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 *OrganizationsEnvironmentsUpdateTraceConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TraceConfig, error) { +// Do executes the "apigee.organizations.environments.apis.revisions.deployments.generateUndeployChangeReport" call. +// Exactly one of *GoogleCloudApigeeV1DeploymentChangeReport or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1DeploymentChangeReport.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 *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeploymentChangeReport, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29676,7 +33140,7 @@ func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1TraceConfig{ + ret := &GoogleCloudApigeeV1DeploymentChangeReport{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29688,34 +33152,25 @@ func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Updates the trace configurations in an environment. Note that the repeated fields have replace semantics when included in the field mask and that they will be overwritten by the value of the fields in the request body.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig", - // "httpMethod": "PATCH", - // "id": "apigee.organizations.environments.updateTraceConfig", + // "description": "Generates a report for a dry run analysis of an UndeployApiProxy request without committing the undeploy. In addition to the standard validations performed when removing deployments, additional analysis will be done to detect possible traffic routing changes that would result from this deployment being removed. Any potential routing conflicts or unsafe changes will be reported in the response. This routing analysis is not performed for a non-dry-run UndeployApiProxy request. For a request path `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/deployments:generateUndeployChangeReport`, two permissions are required: * `apigee.deployments.delete` on the resource `organizations/{org}/environments/{env}` * `apigee.proxyrevisions.undeploy` on the resource `organizations/{org}/apis/{api}/revisions/{rev}`", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/deployments:generateUndeployChangeReport", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.apis.revisions.deployments.generateUndeployChangeReport", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the trace configuration. Use the following structure in your request: \"organizations/*/environments/*/traceConfig\".", + // "description": "Name of the API proxy revision deployment in the following format: `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "List of fields to be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1TraceConfig" - // }, + // "path": "v1/{+name}/deployments:generateUndeployChangeReport", // "response": { - // "$ref": "GoogleCloudApigeeV1TraceConfig" + // "$ref": "GoogleCloudApigeeV1DeploymentChangeReport" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29724,117 +33179,88 @@ func (c *OrganizationsEnvironmentsUpdateTraceConfigCall) Do(opts ...googleapi.Ca } -// method id "apigee.organizations.environments.analytics.admin.getSchemav2": +// method id "apigee.organizations.environments.archiveDeployments.create": -type OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsArchiveDeploymentsCreateCall struct { + s *Service + parent string + googlecloudapigeev1archivedeployment *GoogleCloudApigeeV1ArchiveDeployment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetSchemav2: Gets a list of metrics and dimensions that can be used -// to create analytics queries and reports. Each schema element contains -// the name of the field, its associated type, and a flag indicating -// whether it is a standard or custom field. +// Create: Creates a new ArchiveDeployment. // -// - name: Path to the schema. Use the following structure in your -// request: -// `organizations/{org}/environments/{env}/analytics/admin/schemav2`. -func (r *OrganizationsEnvironmentsAnalyticsAdminService) GetSchemav2(name string) *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call { - c := &OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// DisableCache sets the optional parameter "disableCache": Flag that -// specifies whether the schema is be read from the database or cache. -// Set to `true` to read the schema from the database. Defaults to -// cache. -func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) DisableCache(disableCache bool) *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call { - c.urlParams_.Set("disableCache", fmt.Sprint(disableCache)) - return c -} - -// Type sets the optional parameter "type": Required. Name of the -// dataset for which you want to retrieve the schema. For example: -// `fact` or `agg_cus1` -func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) Type(type_ string) *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call { - c.urlParams_.Set("type", type_) +// - parent: The Environment this Archive Deployment will be created in. +func (r *OrganizationsEnvironmentsArchiveDeploymentsService) Create(parent string, googlecloudapigeev1archivedeployment *GoogleCloudApigeeV1ArchiveDeployment) *OrganizationsEnvironmentsArchiveDeploymentsCreateCall { + c := &OrganizationsEnvironmentsArchiveDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1archivedeployment = googlecloudapigeev1archivedeployment return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call { +func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsArchiveDeploymentsCreateCall { 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 *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call { - 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 *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) Context(ctx context.Context) *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call { +func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsArchiveDeploymentsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) Header() http.Header { +func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1archivedeployment) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/archiveDeployments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.analytics.admin.getSchemav2" call. -// Exactly one of *GoogleCloudApigeeV1Schema or error will be non-nil. +// Do executes the "apigee.organizations.environments.archiveDeployments.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 -// *GoogleCloudApigeeV1Schema.ServerResponse.Header or (if a response +// *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 *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Schema, error) { +func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29853,7 +33279,7 @@ func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Schema{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29865,35 +33291,28 @@ func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) Do(opts ...goog } return ret, nil // { - // "description": "Gets a list of metrics and dimensions that can be used to create analytics queries and reports. Each schema element contains the name of the field, its associated type, and a flag indicating whether it is a standard or custom field.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/analytics/admin/schemav2", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.analytics.admin.getSchemav2", + // "description": "Creates a new ArchiveDeployment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/archiveDeployments", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.archiveDeployments.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "disableCache": { - // "description": "Flag that specifies whether the schema is be read from the database or cache. Set to `true` to read the schema from the database. Defaults to cache.", - // "location": "query", - // "type": "boolean" - // }, - // "name": { - // "description": "Required. Path to the schema. Use the following structure in your request: `organizations/{org}/environments/{env}/analytics/admin/schemav2`.", + // "parent": { + // "description": "Required. The Environment this Archive Deployment will be created in.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/analytics/admin/schemav2$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" - // }, - // "type": { - // "description": "Required. Name of the dataset for which you want to retrieve the schema. For example: `fact` or `agg_cus1`", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/archiveDeployments", + // "request": { + // "$ref": "GoogleCloudApigeeV1ArchiveDeployment" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Schema" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29902,35 +33321,30 @@ func (c *OrganizationsEnvironmentsAnalyticsAdminGetSchemav2Call) Do(opts ...goog } -// method id "apigee.organizations.environments.analytics.exports.create": +// method id "apigee.organizations.environments.archiveDeployments.delete": -type OrganizationsEnvironmentsAnalyticsExportsCreateCall struct { - s *Service - parent string - googlecloudapigeev1exportrequest *GoogleCloudApigeeV1ExportRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsArchiveDeploymentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Submit a data export job to be processed in the background. -// If the request is successful, the API returns a 201 status, a URI -// that can be used to retrieve the status of the export job, and the -// `state` value of "enqueued". +// Delete: Deletes an archive deployment. // -// - parent: Names of the parent organization and environment. Must be -// of the form `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsAnalyticsExportsService) Create(parent string, googlecloudapigeev1exportrequest *GoogleCloudApigeeV1ExportRequest) *OrganizationsEnvironmentsAnalyticsExportsCreateCall { - c := &OrganizationsEnvironmentsAnalyticsExportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1exportrequest = googlecloudapigeev1exportrequest +// - name: Name of the Archive Deployment in the following format: +// `organizations/{org}/environments/{env}/archiveDeployments/{id}`. +func (r *OrganizationsEnvironmentsArchiveDeploymentsService) Delete(name string) *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall { + c := &OrganizationsEnvironmentsArchiveDeploymentsDeleteCall{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 *OrganizationsEnvironmentsAnalyticsExportsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsAnalyticsExportsCreateCall { +func (c *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29938,21 +33352,21 @@ func (c *OrganizationsEnvironmentsAnalyticsExportsCreateCall) Fields(s ...google // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsAnalyticsExportsCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsAnalyticsExportsCreateCall { +func (c *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsAnalyticsExportsCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsAnalyticsExportsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29960,34 +33374,29 @@ func (c *OrganizationsEnvironmentsAnalyticsExportsCreateCall) doRequest(alt stri } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1exportrequest) - 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, "v1/{+parent}/analytics/exports") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.analytics.exports.create" call. -// Exactly one of *GoogleCloudApigeeV1Export or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1Export.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.environments.archiveDeployments.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 *OrganizationsEnvironmentsAnalyticsExportsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Export, error) { +func (c *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30006,7 +33415,7 @@ func (c *OrganizationsEnvironmentsAnalyticsExportsCreateCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Export{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30018,28 +33427,25 @@ func (c *OrganizationsEnvironmentsAnalyticsExportsCreateCall) Do(opts ...googlea } return ret, nil // { - // "description": "Submit a data export job to be processed in the background. If the request is successful, the API returns a 201 status, a URI that can be used to retrieve the status of the export job, and the `state` value of \"enqueued\".", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/analytics/exports", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.analytics.exports.create", + // "description": "Deletes an archive deployment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/archiveDeployments/{archiveDeploymentsId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.environments.archiveDeployments.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Names of the parent organization and environment. Must be of the form `organizations/{org}/environments/{env}`.", + // "name": { + // "description": "Required. Name of the Archive Deployment in the following format: `organizations/{org}/environments/{env}/archiveDeployments/{id}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/archiveDeployments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/analytics/exports", - // "request": { - // "$ref": "GoogleCloudApigeeV1ExportRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Export" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30048,81 +33454,73 @@ func (c *OrganizationsEnvironmentsAnalyticsExportsCreateCall) Do(opts ...googlea } -// method id "apigee.organizations.environments.analytics.exports.get": +// method id "apigee.organizations.environments.archiveDeployments.generateDownloadUrl": -type OrganizationsEnvironmentsAnalyticsExportsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall struct { + s *Service + name string + googlecloudapigeev1generatedownloadurlrequest *GoogleCloudApigeeV1GenerateDownloadUrlRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the details and status of an analytics export job. If the -// export job is still in progress, its `state` is set to "running". -// After the export job has completed successfully, its `state` is set -// to "completed". If the export job fails, its `state` is set to -// `failed`. +// GenerateDownloadUrl: Generates a signed URL for downloading the +// original zip file used to create an Archive Deployment. The URL is +// only valid for a limited period and should be used within minutes +// after generation. Each call returns a new upload URL. // -// - name: Resource name of the export to get. -func (r *OrganizationsEnvironmentsAnalyticsExportsService) Get(name string) *OrganizationsEnvironmentsAnalyticsExportsGetCall { - c := &OrganizationsEnvironmentsAnalyticsExportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Archive Deployment you want to download. +func (r *OrganizationsEnvironmentsArchiveDeploymentsService) GenerateDownloadUrl(name string, googlecloudapigeev1generatedownloadurlrequest *GoogleCloudApigeeV1GenerateDownloadUrlRequest) *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall { + c := &OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudapigeev1generatedownloadurlrequest = googlecloudapigeev1generatedownloadurlrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsAnalyticsExportsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsAnalyticsExportsGetCall { +func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall { 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 *OrganizationsEnvironmentsAnalyticsExportsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsAnalyticsExportsGetCall { - 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 *OrganizationsEnvironmentsAnalyticsExportsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsAnalyticsExportsGetCall { +func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) Context(ctx context.Context) *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsAnalyticsExportsGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsAnalyticsExportsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1generatedownloadurlrequest) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateDownloadUrl") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -30133,14 +33531,16 @@ func (c *OrganizationsEnvironmentsAnalyticsExportsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.analytics.exports.get" call. -// Exactly one of *GoogleCloudApigeeV1Export or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1Export.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 *OrganizationsEnvironmentsAnalyticsExportsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Export, error) { +// Do executes the "apigee.organizations.environments.archiveDeployments.generateDownloadUrl" call. +// Exactly one of *GoogleCloudApigeeV1GenerateDownloadUrlResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1GenerateDownloadUrlResponse.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 *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1GenerateDownloadUrlResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30159,7 +33559,7 @@ func (c *OrganizationsEnvironmentsAnalyticsExportsGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Export{ + ret := &GoogleCloudApigeeV1GenerateDownloadUrlResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30171,25 +33571,28 @@ func (c *OrganizationsEnvironmentsAnalyticsExportsGetCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Gets the details and status of an analytics export job. If the export job is still in progress, its `state` is set to \"running\". After the export job has completed successfully, its `state` is set to \"completed\". If the export job fails, its `state` is set to `failed`.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/analytics/exports/{exportsId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.analytics.exports.get", + // "description": "Generates a signed URL for downloading the original zip file used to create an Archive Deployment. The URL is only valid for a limited period and should be used within minutes after generation. Each call returns a new upload URL.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/archiveDeployments/{archiveDeploymentsId}:generateDownloadUrl", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.archiveDeployments.generateDownloadUrl", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the export to get.", + // "description": "Required. The name of the Archive Deployment you want to download.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/analytics/exports/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/archiveDeployments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}:generateDownloadUrl", + // "request": { + // "$ref": "GoogleCloudApigeeV1GenerateDownloadUrlRequest" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Export" + // "$ref": "GoogleCloudApigeeV1GenerateDownloadUrlResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30198,79 +33601,83 @@ func (c *OrganizationsEnvironmentsAnalyticsExportsGetCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.analytics.exports.list": +// method id "apigee.organizations.environments.archiveDeployments.generateUploadUrl": -type OrganizationsEnvironmentsAnalyticsExportsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall struct { + s *Service + parent string + googlecloudapigeev1generateuploadurlrequest *GoogleCloudApigeeV1GenerateUploadUrlRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the details and status of all analytics export jobs -// belonging to the parent organization and environment. +// GenerateUploadUrl: Generates a signed URL for uploading an Archive +// zip file to Google Cloud Storage. Once the upload is complete, the +// signed URL should be passed to CreateArchiveDeployment. When +// uploading to the generated signed URL, please follow these +// restrictions: * Source file type should be a zip file. * Source file +// size should not exceed 1GB limit. * No credentials should be attached +// - the signed URLs provide access to the target bucket using internal +// service identity; if credentials were attached, the identity from the +// credentials would be used, but that identity does not have +// permissions to upload files to the URL. When making a HTTP PUT +// request, these two headers need to be specified: * `content-type: +// application/zip` * `x-goog-content-length-range: 0,1073741824` And +// this header SHOULD NOT be specified: * `Authorization: Bearer +// YOUR_TOKEN` // -// - parent: Names of the parent organization and environment. Must be -// of the form `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsAnalyticsExportsService) List(parent string) *OrganizationsEnvironmentsAnalyticsExportsListCall { - c := &OrganizationsEnvironmentsAnalyticsExportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The organization and environment to upload to. +func (r *OrganizationsEnvironmentsArchiveDeploymentsService) GenerateUploadUrl(parent string, googlecloudapigeev1generateuploadurlrequest *GoogleCloudApigeeV1GenerateUploadUrlRequest) *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall { + c := &OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.googlecloudapigeev1generateuploadurlrequest = googlecloudapigeev1generateuploadurlrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsAnalyticsExportsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsAnalyticsExportsListCall { +func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall { 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 *OrganizationsEnvironmentsAnalyticsExportsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsAnalyticsExportsListCall { - 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 *OrganizationsEnvironmentsAnalyticsExportsListCall) Context(ctx context.Context) *OrganizationsEnvironmentsAnalyticsExportsListCall { +func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall) Context(ctx context.Context) *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsAnalyticsExportsListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsAnalyticsExportsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1generateuploadurlrequest) + 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, "v1/{+parent}/analytics/exports") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/archiveDeployments:generateUploadUrl") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -30281,15 +33688,16 @@ func (c *OrganizationsEnvironmentsAnalyticsExportsListCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.analytics.exports.list" call. -// Exactly one of *GoogleCloudApigeeV1ListExportsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudApigeeV1ListExportsResponse.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 *OrganizationsEnvironmentsAnalyticsExportsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListExportsResponse, error) { +// Do executes the "apigee.organizations.environments.archiveDeployments.generateUploadUrl" call. +// Exactly one of *GoogleCloudApigeeV1GenerateUploadUrlResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1GenerateUploadUrlResponse.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 *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1GenerateUploadUrlResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30308,7 +33716,7 @@ func (c *OrganizationsEnvironmentsAnalyticsExportsListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListExportsResponse{ + ret := &GoogleCloudApigeeV1GenerateUploadUrlResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30320,25 +33728,28 @@ func (c *OrganizationsEnvironmentsAnalyticsExportsListCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Lists the details and status of all analytics export jobs belonging to the parent organization and environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/analytics/exports", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.analytics.exports.list", + // "description": "Generates a signed URL for uploading an Archive zip file to Google Cloud Storage. Once the upload is complete, the signed URL should be passed to CreateArchiveDeployment. When uploading to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * Source file size should not exceed 1GB limit. * No credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, these two headers need to be specified: * `content-type: application/zip` * `x-goog-content-length-range: 0,1073741824` And this header SHOULD NOT be specified: * `Authorization: Bearer YOUR_TOKEN`", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/archiveDeployments:generateUploadUrl", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.archiveDeployments.generateUploadUrl", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Names of the parent organization and environment. Must be of the form `organizations/{org}/environments/{env}`.", + // "description": "Required. The organization and environment to upload to.", // "location": "path", // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/analytics/exports", + // "path": "v1/{+parent}/archiveDeployments:generateUploadUrl", + // "request": { + // "$ref": "GoogleCloudApigeeV1GenerateUploadUrlRequest" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ListExportsResponse" + // "$ref": "GoogleCloudApigeeV1GenerateUploadUrlResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30347,32 +33758,31 @@ func (c *OrganizationsEnvironmentsAnalyticsExportsListCall) Do(opts ...googleapi } -// method id "apigee.organizations.environments.apis.deployments.list": +// method id "apigee.organizations.environments.archiveDeployments.get": -type OrganizationsEnvironmentsApisDeploymentsListCall struct { +type OrganizationsEnvironmentsArchiveDeploymentsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all deployments of an API proxy in an environment. +// Get: Gets the specified ArchiveDeployment. // -// - parent: Name representing an API proxy in an environment in the -// following format: -// `organizations/{org}/environments/{env}/apis/{api}`. -func (r *OrganizationsEnvironmentsApisDeploymentsService) List(parent string) *OrganizationsEnvironmentsApisDeploymentsListCall { - c := &OrganizationsEnvironmentsApisDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Name of the Archive Deployment in the following format: +// `organizations/{org}/environments/{env}/archiveDeployments/{id}`. +func (r *OrganizationsEnvironmentsArchiveDeploymentsService) Get(name string) *OrganizationsEnvironmentsArchiveDeploymentsGetCall { + c := &OrganizationsEnvironmentsArchiveDeploymentsGetCall{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 *OrganizationsEnvironmentsApisDeploymentsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisDeploymentsListCall { +func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsArchiveDeploymentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30382,7 +33792,7 @@ func (c *OrganizationsEnvironmentsApisDeploymentsListCall) Fields(s ...googleapi // 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 *OrganizationsEnvironmentsApisDeploymentsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsApisDeploymentsListCall { +func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsArchiveDeploymentsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -30390,21 +33800,21 @@ func (c *OrganizationsEnvironmentsApisDeploymentsListCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsApisDeploymentsListCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisDeploymentsListCall { +func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsArchiveDeploymentsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsApisDeploymentsListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsApisDeploymentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -30417,7 +33827,7 @@ func (c *OrganizationsEnvironmentsApisDeploymentsListCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -30425,21 +33835,20 @@ func (c *OrganizationsEnvironmentsApisDeploymentsListCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.apis.deployments.list" call. -// Exactly one of *GoogleCloudApigeeV1ListDeploymentsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListDeploymentsResponse.ServerResponse.Header or +// Do executes the "apigee.organizations.environments.archiveDeployments.get" call. +// Exactly one of *GoogleCloudApigeeV1ArchiveDeployment or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1ArchiveDeployment.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 *OrganizationsEnvironmentsApisDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeploymentsResponse, error) { +func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ArchiveDeployment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30458,7 +33867,7 @@ func (c *OrganizationsEnvironmentsApisDeploymentsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListDeploymentsResponse{ + ret := &GoogleCloudApigeeV1ArchiveDeployment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30470,25 +33879,25 @@ func (c *OrganizationsEnvironmentsApisDeploymentsListCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Lists all deployments of an API proxy in an environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/deployments", + // "description": "Gets the specified ArchiveDeployment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/archiveDeployments/{archiveDeploymentsId}", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.apis.deployments.list", + // "id": "apigee.organizations.environments.archiveDeployments.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name representing an API proxy in an environment in the following format: `organizations/{org}/environments/{env}/apis/{api}`", + // "name": { + // "description": "Required. Name of the Archive Deployment in the following format: `organizations/{org}/environments/{env}/archiveDeployments/{id}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/archiveDeployments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/deployments", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListDeploymentsResponse" + // "$ref": "GoogleCloudApigeeV1ArchiveDeployment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30497,135 +33906,123 @@ func (c *OrganizationsEnvironmentsApisDeploymentsListCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.apis.revisions.deploy": +// method id "apigee.organizations.environments.archiveDeployments.list": -type OrganizationsEnvironmentsApisRevisionsDeployCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsArchiveDeploymentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Deploy: Deploys a revision of an API proxy. If another revision of -// the same API proxy revision is currently deployed, set the `override` -// parameter to `true` to have this revision replace the currently -// deployed revision. You cannot invoke an API proxy until it has been -// deployed to an environment. After you deploy an API proxy revision, -// you cannot edit it. To edit the API proxy, you must create and deploy -// a new revision. For a request path -// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/dep -// loyments`, two permissions are required: * -// `apigee.deployments.create` on the resource -// `organizations/{org}/environments/{env}` * -// `apigee.proxyrevisions.deploy` on the resource -// `organizations/{org}/apis/{api}/revisions/{rev}` +// List: Lists the ArchiveDeployments in the specified Environment. // -// - name: Name of the API proxy revision deployment in the following -// format: -// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`. -func (r *OrganizationsEnvironmentsApisRevisionsService) Deploy(name string) *OrganizationsEnvironmentsApisRevisionsDeployCall { - c := &OrganizationsEnvironmentsApisRevisionsDeployCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the Environment for which to list Archive +// Deployments in the format: +// `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsArchiveDeploymentsService) List(parent string) *OrganizationsEnvironmentsArchiveDeploymentsListCall { + c := &OrganizationsEnvironmentsArchiveDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Override sets the optional parameter "override": Flag that specifies -// whether the new deployment replaces other deployed revisions of the -// API proxy in the environment. Set `override` to `true` to replace -// other deployed revisions. By default, `override` is `false` and the -// deployment is rejected if other revisions of the API proxy are -// deployed in the environment. -func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) Override(override bool) *OrganizationsEnvironmentsApisRevisionsDeployCall { - c.urlParams_.Set("override", fmt.Sprint(override)) +// Filter sets the optional parameter "filter": An optional query used +// to return a subset of Archive Deployments using the semantics defined +// in https://google.aip.dev/160. +func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) Filter(filter string) *OrganizationsEnvironmentsArchiveDeploymentsListCall { + c.urlParams_.Set("filter", filter) return c } -// SequencedRollout sets the optional parameter "sequencedRollout": Flag -// that specifies whether to enable sequenced rollout. If set to `true`, -// the routing rules for this deployment and the environment changes to -// add the deployment will be rolled out in a safe order. This reduces -// the risk of downtime that could be caused by changing the environment -// group's routing before the new destination for the affected traffic -// is ready to receive it. This should only be necessary if the new -// deployment will be capturing traffic from another environment under a -// shared environment group or if traffic will be rerouted to a -// different environment due to a base path removal. The -// GenerateDeployChangeReport API (GenerateDeployChangeReport) may be -// used to examine routing changes before issuing the deployment -// request, and its response will indicate if a sequenced rollout is -// recommended for the deployment. -func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) SequencedRollout(sequencedRollout bool) *OrganizationsEnvironmentsApisRevisionsDeployCall { - c.urlParams_.Set("sequencedRollout", fmt.Sprint(sequencedRollout)) +// PageSize sets the optional parameter "pageSize": Maximum number of +// Archive Deployments to return. If unspecified, at most 25 deployments +// will be returned. +func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) PageSize(pageSize int64) *OrganizationsEnvironmentsArchiveDeploymentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// ServiceAccount sets the optional parameter "serviceAccount": Google -// Cloud IAM service account. The service account represents the -// identity of the deployed proxy, and determines what permissions it -// has. The format must be -// `{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`. -func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) ServiceAccount(serviceAccount string) *OrganizationsEnvironmentsApisRevisionsDeployCall { - c.urlParams_.Set("serviceAccount", serviceAccount) +// PageToken sets the optional parameter "pageToken": Page token, +// returned from a previous ListArchiveDeployments call, that you can +// use to retrieve the next page. +func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) PageToken(pageToken string) *OrganizationsEnvironmentsArchiveDeploymentsListCall { + 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 *OrganizationsEnvironmentsApisRevisionsDeployCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDeployCall { +func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsArchiveDeploymentsListCall { 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 *OrganizationsEnvironmentsArchiveDeploymentsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsArchiveDeploymentsListCall { + 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 *OrganizationsEnvironmentsApisRevisionsDeployCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDeployCall { +func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) Context(ctx context.Context) *OrganizationsEnvironmentsArchiveDeploymentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) Header() http.Header { +func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}/deployments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/archiveDeployments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.apis.revisions.deploy" call. -// Exactly one of *GoogleCloudApigeeV1Deployment or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Deployment.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 *OrganizationsEnvironmentsApisRevisionsDeployCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Deployment, error) { +// Do executes the "apigee.organizations.environments.archiveDeployments.list" call. +// Exactly one of *GoogleCloudApigeeV1ListArchiveDeploymentsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListArchiveDeploymentsResponse.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 *OrganizationsEnvironmentsArchiveDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListArchiveDeploymentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30644,7 +34041,7 @@ func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Deployment{ + ret := &GoogleCloudApigeeV1ListArchiveDeploymentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30656,40 +34053,41 @@ func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Deploys a revision of an API proxy. If another revision of the same API proxy revision is currently deployed, set the `override` parameter to `true` to have this revision replace the currently deployed revision. You cannot invoke an API proxy until it has been deployed to an environment. After you deploy an API proxy revision, you cannot edit it. To edit the API proxy, you must create and deploy a new revision. For a request path `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/deployments`, two permissions are required: * `apigee.deployments.create` on the resource `organizations/{org}/environments/{env}` * `apigee.proxyrevisions.deploy` on the resource `organizations/{org}/apis/{api}/revisions/{rev}` ", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/deployments", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.apis.revisions.deploy", + // "description": "Lists the ArchiveDeployments in the specified Environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/archiveDeployments", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.archiveDeployments.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the API proxy revision deployment in the following format: `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`", - // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+$", - // "required": true, + // "filter": { + // "description": "Optional. An optional query used to return a subset of Archive Deployments using the semantics defined in https://google.aip.dev/160.", + // "location": "query", // "type": "string" // }, - // "override": { - // "description": "Flag that specifies whether the new deployment replaces other deployed revisions of the API proxy in the environment. Set `override` to `true` to replace other deployed revisions. By default, `override` is `false` and the deployment is rejected if other revisions of the API proxy are deployed in the environment.", + // "pageSize": { + // "description": "Optional. Maximum number of Archive Deployments to return. If unspecified, at most 25 deployments will be returned.", + // "format": "int32", // "location": "query", - // "type": "boolean" + // "type": "integer" // }, - // "sequencedRollout": { - // "description": "Flag that specifies whether to enable sequenced rollout. If set to `true`, the routing rules for this deployment and the environment changes to add the deployment will be rolled out in a safe order. This reduces the risk of downtime that could be caused by changing the environment group's routing before the new destination for the affected traffic is ready to receive it. This should only be necessary if the new deployment will be capturing traffic from another environment under a shared environment group or if traffic will be rerouted to a different environment due to a base path removal. The [GenerateDeployChangeReport API](GenerateDeployChangeReport) may be used to examine routing changes before issuing the deployment request, and its response will indicate if a sequenced rollout is recommended for the deployment.", + // "pageToken": { + // "description": "Optional. Page token, returned from a previous ListArchiveDeployments call, that you can use to retrieve the next page.", // "location": "query", - // "type": "boolean" + // "type": "string" // }, - // "serviceAccount": { - // "description": "Google Cloud IAM service account. The service account represents the identity of the deployed proxy, and determines what permissions it has. The format must be `{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`.", - // "location": "query", + // "parent": { + // "description": "Required. Name of the Environment for which to list Archive Deployments in the format: `organizations/{org}/environments/{env}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}/deployments", + // "path": "v1/{+parent}/archiveDeployments", // "response": { - // "$ref": "GoogleCloudApigeeV1Deployment" + // "$ref": "GoogleCloudApigeeV1ListArchiveDeploymentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30698,80 +34096,100 @@ func (c *OrganizationsEnvironmentsApisRevisionsDeployCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.apis.revisions.getDeployments": +// 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 *OrganizationsEnvironmentsArchiveDeploymentsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListArchiveDeploymentsResponse) 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) + } +} -type OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "apigee.organizations.environments.archiveDeployments.patch": + +type OrganizationsEnvironmentsArchiveDeploymentsPatchCall struct { + s *Service + name string + googlecloudapigeev1archivedeployment *GoogleCloudApigeeV1ArchiveDeployment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetDeployments: Gets the deployment of an API proxy revision and -// actual state reported by runtime pods. +// Patch: Updates an existing ArchiveDeployment. Labels can modified but +// most of the other fields are not modifiable. // -// - name: Name representing an API proxy revision in an environment in -// the following format: -// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`. -func (r *OrganizationsEnvironmentsApisRevisionsService) GetDeployments(name string) *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall { - c := &OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the Archive Deployment in the following format: +// `organizations/{org}/environments/{env}/archiveDeployments/{id}`. +func (r *OrganizationsEnvironmentsArchiveDeploymentsService) Patch(name string, googlecloudapigeev1archivedeployment *GoogleCloudApigeeV1ArchiveDeployment) *OrganizationsEnvironmentsArchiveDeploymentsPatchCall { + c := &OrganizationsEnvironmentsArchiveDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudapigeev1archivedeployment = googlecloudapigeev1archivedeployment + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to be updated. +func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) UpdateMask(updateMask string) *OrganizationsEnvironmentsArchiveDeploymentsPatchCall { + 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 *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall { +func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsArchiveDeploymentsPatchCall { 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 *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall { - 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 *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall { +func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) Context(ctx context.Context) *OrganizationsEnvironmentsArchiveDeploymentsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) Header() http.Header { +func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1archivedeployment) + 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, "v1/{+name}/deployments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -30782,14 +34200,15 @@ func (c *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.apis.revisions.getDeployments" call. -// Exactly one of *GoogleCloudApigeeV1Deployment or error will be +// Do executes the "apigee.organizations.environments.archiveDeployments.patch" call. +// Exactly one of *GoogleCloudApigeeV1ArchiveDeployment or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Deployment.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 *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Deployment, error) { +// either *GoogleCloudApigeeV1ArchiveDeployment.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 *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ArchiveDeployment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30808,7 +34227,7 @@ func (c *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Deployment{ + ret := &GoogleCloudApigeeV1ArchiveDeployment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30820,25 +34239,34 @@ func (c *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) Do(opts ...go } return ret, nil // { - // "description": "Gets the deployment of an API proxy revision and actual state reported by runtime pods.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/deployments", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.apis.revisions.getDeployments", + // "description": "Updates an existing ArchiveDeployment. Labels can modified but most of the other fields are not modifiable.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/archiveDeployments/{archiveDeploymentsId}", + // "httpMethod": "PATCH", + // "id": "apigee.organizations.environments.archiveDeployments.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name representing an API proxy revision in an environment in the following format: `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`", + // "description": "Name of the Archive Deployment in the following format: `organizations/{org}/environments/{env}/archiveDeployments/{id}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/archiveDeployments/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}/deployments", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1ArchiveDeployment" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Deployment" + // "$ref": "GoogleCloudApigeeV1ArchiveDeployment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30847,9 +34275,9 @@ func (c *OrganizationsEnvironmentsApisRevisionsGetDeploymentsCall) Do(opts ...go } -// method id "apigee.organizations.environments.apis.revisions.undeploy": +// method id "apigee.organizations.environments.caches.delete": -type OrganizationsEnvironmentsApisRevisionsUndeployCall struct { +type OrganizationsEnvironmentsCachesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -30857,44 +34285,21 @@ type OrganizationsEnvironmentsApisRevisionsUndeployCall struct { header_ http.Header } -// Undeploy: Undeploys an API proxy revision from an environment. For a -// request path -// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/dep -// loyments`, two permissions are required: * -// `apigee.deployments.delete` on the resource -// `organizations/{org}/environments/{env}` * -// `apigee.proxyrevisions.undeploy` on the resource -// `organizations/{org}/apis/{api}/revisions/{rev}` +// Delete: Deletes a cache. // -// - name: Name of the API proxy revision deployment in the following -// format: -// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`. -func (r *OrganizationsEnvironmentsApisRevisionsService) Undeploy(name string) *OrganizationsEnvironmentsApisRevisionsUndeployCall { - c := &OrganizationsEnvironmentsApisRevisionsUndeployCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Cache resource name of the form: +// `organizations/{organization_id}/environments/{environment_id}/cache +// s/{cache_id}`. +func (r *OrganizationsEnvironmentsCachesService) Delete(name string) *OrganizationsEnvironmentsCachesDeleteCall { + c := &OrganizationsEnvironmentsCachesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// SequencedRollout sets the optional parameter "sequencedRollout": Flag -// that specifies whether to enable sequenced rollout. If set to `true`, -// the environment group routing rules corresponding to this deployment -// will be removed before removing the deployment from the runtime. This -// is likely to be a rare use case; it is only needed when the intended -// effect of undeploying this proxy is to cause the traffic it currently -// handles to be rerouted to some other existing proxy in the -// environment group. The GenerateUndeployChangeReport API -// (GenerateUndeployChangeReport) may be used to examine routing changes -// before issuing the undeployment request, and its response will -// indicate if a sequenced rollout is recommended for the undeployment. -func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) SequencedRollout(sequencedRollout bool) *OrganizationsEnvironmentsApisRevisionsUndeployCall { - c.urlParams_.Set("sequencedRollout", fmt.Sprint(sequencedRollout)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsUndeployCall { +func (c *OrganizationsEnvironmentsCachesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsCachesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30902,21 +34307,21 @@ func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) Fields(s ...googlea // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsUndeployCall { +func (c *OrganizationsEnvironmentsCachesDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsCachesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) Header() http.Header { +func (c *OrganizationsEnvironmentsCachesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsCachesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -30926,7 +34331,7 @@ func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) doRequest(alt strin var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/deployments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -30939,14 +34344,14 @@ func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.apis.revisions.undeploy" call. +// Do executes the "apigee.organizations.environments.caches.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 *OrganizationsEnvironmentsApisRevisionsUndeployCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsEnvironmentsCachesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30977,28 +34382,23 @@ func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) Do(opts ...googleap } return ret, nil // { - // "description": "Undeploys an API proxy revision from an environment. For a request path `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/deployments`, two permissions are required: * `apigee.deployments.delete` on the resource `organizations/{org}/environments/{env}` * `apigee.proxyrevisions.undeploy` on the resource `organizations/{org}/apis/{api}/revisions/{rev}`", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/deployments", + // "description": "Deletes a cache.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/caches/{cachesId}", // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.apis.revisions.undeploy", + // "id": "apigee.organizations.environments.caches.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the API proxy revision deployment in the following format: `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`", + // "description": "Required. Cache resource name of the form: `organizations/{organization_id}/environments/{environment_id}/caches/{cache_id}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/caches/[^/]+$", // "required": true, // "type": "string" - // }, - // "sequencedRollout": { - // "description": "Flag that specifies whether to enable sequenced rollout. If set to `true`, the environment group routing rules corresponding to this deployment will be removed before removing the deployment from the runtime. This is likely to be a rare use case; it is only needed when the intended effect of undeploying this proxy is to cause the traffic it currently handles to be rerouted to some other existing proxy in the environment group. The [GenerateUndeployChangeReport API](GenerateUndeployChangeReport) may be used to examine routing changes before issuing the undeployment request, and its response will indicate if a sequenced rollout is recommended for the undeployment.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1/{+name}/deployments", + // "path": "v1/{+name}", // "response": { // "$ref": "GoogleProtobufEmpty" // }, @@ -31009,81 +34409,89 @@ func (c *OrganizationsEnvironmentsApisRevisionsUndeployCall) Do(opts ...googleap } -// method id "apigee.organizations.environments.apis.revisions.debugsessions.create": +// method id "apigee.organizations.environments.deployments.list": -type OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall struct { - s *Service - parent string - googlecloudapigeev1debugsession *GoogleCloudApigeeV1DebugSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsDeploymentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a debug session for a deployed API Proxy revision. +// List: Lists all deployments of API proxies or shared flows in an +// environment. // -// - parent: The resource name of the API Proxy revision deployment for -// which to create the DebugSession. Must be of the form -// `organizations/{organization}/environments/{environment}/apis/{api}/ -// revisions/{revision}`. -func (r *OrganizationsEnvironmentsApisRevisionsDebugsessionsService) Create(parent string, googlecloudapigeev1debugsession *GoogleCloudApigeeV1DebugSession) *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall { - c := &OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the environment for which to return deployment +// information in the following format: +// `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsDeploymentsService) List(parent string) *OrganizationsEnvironmentsDeploymentsListCall { + c := &OrganizationsEnvironmentsDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1debugsession = googlecloudapigeev1debugsession return c } -// Timeout sets the optional parameter "timeout": The time in seconds -// after which this DebugSession should end. A timeout specified in -// DebugSession will overwrite this value. -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) Timeout(timeout int64) *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall { - c.urlParams_.Set("timeout", fmt.Sprint(timeout)) +// SharedFlows sets the optional parameter "sharedFlows": Flag that +// specifies whether to return shared flow or API proxy deployments. Set +// to `true` to return shared flow deployments; set to `false` to return +// API proxy deployments. Defaults to `false`. +func (c *OrganizationsEnvironmentsDeploymentsListCall) SharedFlows(sharedFlows bool) *OrganizationsEnvironmentsDeploymentsListCall { + c.urlParams_.Set("sharedFlows", fmt.Sprint(sharedFlows)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall { +func (c *OrganizationsEnvironmentsDeploymentsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsDeploymentsListCall { 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 *OrganizationsEnvironmentsDeploymentsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsDeploymentsListCall { + 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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall { +func (c *OrganizationsEnvironmentsDeploymentsListCall) Context(ctx context.Context) *OrganizationsEnvironmentsDeploymentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsDeploymentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsDeploymentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1debugsession) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/debugsessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -31094,14 +34502,16 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.apis.revisions.debugsessions.create" call. -// Exactly one of *GoogleCloudApigeeV1DebugSession or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DebugSession.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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DebugSession, error) { +// Do executes the "apigee.organizations.environments.deployments.list" call. +// Exactly one of *GoogleCloudApigeeV1ListDeploymentsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListDeploymentsResponse.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 *OrganizationsEnvironmentsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeploymentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31120,7 +34530,7 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DebugSession{ + ret := &GoogleCloudApigeeV1ListDeploymentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31132,34 +34542,30 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) Do(opts } return ret, nil // { - // "description": "Creates a debug session for a deployed API Proxy revision.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/debugsessions", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.apis.revisions.debugsessions.create", + // "description": "Lists all deployments of API proxies or shared flows in an environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/deployments", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.deployments.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The resource name of the API Proxy revision deployment for which to create the DebugSession. Must be of the form `organizations/{organization}/environments/{environment}/apis/{api}/revisions/{revision}`.", + // "description": "Required. Name of the environment for which to return deployment information in the following format: `organizations/{org}/environments/{env}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // }, - // "timeout": { - // "description": "Optional. The time in seconds after which this DebugSession should end. A timeout specified in DebugSession will overwrite this value.", - // "format": "int64", + // "sharedFlows": { + // "description": "Optional. Flag that specifies whether to return shared flow or API proxy deployments. Set to `true` to return shared flow deployments; set to `false` to return API proxy deployments. Defaults to `false`.", // "location": "query", - // "type": "string" + // "type": "boolean" // } // }, - // "path": "v1/{+parent}/debugsessions", - // "request": { - // "$ref": "GoogleCloudApigeeV1DebugSession" - // }, + // "path": "v1/{+parent}/deployments", // "response": { - // "$ref": "GoogleCloudApigeeV1DebugSession" + // "$ref": "GoogleCloudApigeeV1ListDeploymentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31168,33 +34574,33 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsCreateCall) Do(opts } -// method id "apigee.organizations.environments.apis.revisions.debugsessions.deleteData": +// method id "apigee.organizations.environments.flowhooks.attachSharedFlowToFlowHook": -type OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall struct { + s *Service + name string + googlecloudapigeev1flowhook *GoogleCloudApigeeV1FlowHook + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DeleteData: Deletes the data from a debug session. This does not -// cancel the debug session or prevent further data from being collected -// if the session is still active in runtime pods. +// AttachSharedFlowToFlowHook: Attaches a shared flow to a flow hook. // -// - name: The name of the debug session to delete. Must be of the form: -// `organizations/{organization}/environments/{environment}/apis/{api}/ -// revisions/{revision}/debugsessions/{debugsession}`. -func (r *OrganizationsEnvironmentsApisRevisionsDebugsessionsService) DeleteData(name string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall { - c := &OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the flow hook to which the shared flow should be +// attached in the following format: +// `organizations/{org}/environments/{env}/flowhooks/{flowhook}`. +func (r *OrganizationsEnvironmentsFlowhooksService) AttachSharedFlowToFlowHook(name string, googlecloudapigeev1flowhook *GoogleCloudApigeeV1FlowHook) *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall { + c := &OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudapigeev1flowhook = googlecloudapigeev1flowhook return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall { +func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31202,21 +34608,21 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall { +func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) Context(ctx context.Context) *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) Header() http.Header { +func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -31224,11 +34630,16 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) doRe } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1flowhook) + 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, "v1/{+name}/data") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -31239,14 +34650,14 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) doRe return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.apis.revisions.debugsessions.deleteData" 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 +// Do executes the "apigee.organizations.environments.flowhooks.attachSharedFlowToFlowHook" call. +// Exactly one of *GoogleCloudApigeeV1FlowHook or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1FlowHook.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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1FlowHook, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31265,7 +34676,7 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudApigeeV1FlowHook{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31277,25 +34688,28 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) Do(o } return ret, nil // { - // "description": "Deletes the data from a debug session. This does not cancel the debug session or prevent further data from being collected if the session is still active in runtime pods.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/debugsessions/{debugsessionsId}/data", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.apis.revisions.debugsessions.deleteData", + // "description": "Attaches a shared flow to a flow hook.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/flowhooks/{flowhooksId}", + // "httpMethod": "PUT", + // "id": "apigee.organizations.environments.flowhooks.attachSharedFlowToFlowHook", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the debug session to delete. Must be of the form: `organizations/{organization}/environments/{environment}/apis/{api}/revisions/{revision}/debugsessions/{debugsession}`.", + // "description": "Required. Name of the flow hook to which the shared flow should be attached in the following format: `organizations/{org}/environments/{env}/flowhooks/{flowhook}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+/debugsessions/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/flowhooks/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}/data", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1FlowHook" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudApigeeV1FlowHook" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31304,25 +34718,23 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDeleteDataCall) Do(o } -// method id "apigee.organizations.environments.apis.revisions.debugsessions.get": +// method id "apigee.organizations.environments.flowhooks.detachSharedFlowFromFlowHook": -type OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a debug session. +// DetachSharedFlowFromFlowHook: Detaches a shared flow from a flow +// hook. // -// - name: The name of the debug session to retrieve. Must be of the -// form: -// `organizations/{organization}/environments/{environment}/apis/{api}/ -// revisions/{revision}/debugsessions/{session}`. -func (r *OrganizationsEnvironmentsApisRevisionsDebugsessionsService) Get(name string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall { - c := &OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the flow hook to detach in the following format: +// `organizations/{org}/environments/{env}/flowhooks/{flowhook}`. +func (r *OrganizationsEnvironmentsFlowhooksService) DetachSharedFlowFromFlowHook(name string) *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall { + c := &OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -31330,54 +34742,41 @@ func (r *OrganizationsEnvironmentsApisRevisionsDebugsessionsService) Get(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall { +func (c *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall { 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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall { - 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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall { +func (c *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall) Context(ctx context.Context) *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -31388,14 +34787,14 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.apis.revisions.debugsessions.get" call. -// Exactly one of *GoogleCloudApigeeV1DebugSession or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1DebugSession.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 +// Do executes the "apigee.organizations.environments.flowhooks.detachSharedFlowFromFlowHook" call. +// Exactly one of *GoogleCloudApigeeV1FlowHook or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1FlowHook.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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DebugSession, error) { +func (c *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1FlowHook, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31414,7 +34813,7 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DebugSession{ + ret := &GoogleCloudApigeeV1FlowHook{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31426,25 +34825,25 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) Do(opts ... } return ret, nil // { - // "description": "Retrieves a debug session.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/debugsessions/{debugsessionsId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.apis.revisions.debugsessions.get", + // "description": "Detaches a shared flow from a flow hook.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/flowhooks/{flowhooksId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.environments.flowhooks.detachSharedFlowFromFlowHook", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the debug session to retrieve. Must be of the form: `organizations/{organization}/environments/{environment}/apis/{api}/revisions/{revision}/debugsessions/{session}`.", + // "description": "Required. Name of the flow hook to detach in the following format: `organizations/{org}/environments/{env}/flowhooks/{flowhook}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+/debugsessions/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/flowhooks/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1DebugSession" + // "$ref": "GoogleCloudApigeeV1FlowHook" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31453,49 +34852,34 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsGetCall) Do(opts ... } -// method id "apigee.organizations.environments.apis.revisions.debugsessions.list": +// method id "apigee.organizations.environments.flowhooks.get": -type OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall struct { +type OrganizationsEnvironmentsFlowhooksGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists debug sessions that are currently active in the given API -// Proxy revision. +// Get: Returns the name of the shared flow attached to the specified +// flow hook. If there's no shared flow attached to the flow hook, the +// API does not return an error; it simply does not return a name in the +// response. // -// - parent: The name of the API Proxy revision deployment for which to -// list debug sessions. Must be of the form: -// `organizations/{organization}/environments/{environment}/apis/{api}/ -// revisions/{revision}`. -func (r *OrganizationsEnvironmentsApisRevisionsDebugsessionsService) List(parent string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall { - c := &OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// debug sessions to return. The page size defaults to 25. -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) PageSize(pageSize int64) *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token, -// returned from a previous ListDebugSessions call, that you can use to -// retrieve the next page. -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) PageToken(pageToken string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Name of the flow hook in the following format: +// `organizations/{org}/environments/{env}/flowhooks/{flowhook}`. +func (r *OrganizationsEnvironmentsFlowhooksService) Get(name string) *OrganizationsEnvironmentsFlowhooksGetCall { + c := &OrganizationsEnvironmentsFlowhooksGetCall{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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall { +func (c *OrganizationsEnvironmentsFlowhooksGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsFlowhooksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31505,7 +34889,7 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) Fields(s . // 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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall { +func (c *OrganizationsEnvironmentsFlowhooksGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsFlowhooksGetCall { c.ifNoneMatch_ = entityTag return c } @@ -31513,21 +34897,21 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) IfNoneMatc // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall { +func (c *OrganizationsEnvironmentsFlowhooksGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsFlowhooksGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsFlowhooksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsFlowhooksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -31540,7 +34924,7 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) doRequest( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/debugsessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -31548,21 +34932,19 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) doRequest( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.apis.revisions.debugsessions.list" call. -// Exactly one of *GoogleCloudApigeeV1ListDebugSessionsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListDebugSessionsResponse.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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDebugSessionsResponse, error) { +// Do executes the "apigee.organizations.environments.flowhooks.get" call. +// Exactly one of *GoogleCloudApigeeV1FlowHook or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1FlowHook.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 *OrganizationsEnvironmentsFlowhooksGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1FlowHook, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31581,7 +34963,7 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListDebugSessionsResponse{ + ret := &GoogleCloudApigeeV1FlowHook{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31593,36 +34975,25 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) Do(opts .. } return ret, nil // { - // "description": "Lists debug sessions that are currently active in the given API Proxy revision.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/debugsessions", + // "description": "Returns the name of the shared flow attached to the specified flow hook. If there's no shared flow attached to the flow hook, the API does not return an error; it simply does not return a name in the response.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/flowhooks/{flowhooksId}", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.apis.revisions.debugsessions.list", + // "id": "apigee.organizations.environments.flowhooks.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Maximum number of debug sessions to return. The page size defaults to 25.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Page token, returned from a previous ListDebugSessions call, that you can use to retrieve the next page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The name of the API Proxy revision deployment for which to list debug sessions. Must be of the form: `organizations/{organization}/environments/{environment}/apis/{api}/revisions/{revision}`.", + // "name": { + // "description": "Required. Name of the flow hook in the following format: `organizations/{org}/environments/{env}/flowhooks/{flowhook}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/flowhooks/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/debugsessions", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListDebugSessionsResponse" + // "$ref": "GoogleCloudApigeeV1FlowHook" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31631,121 +35002,101 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) Do(opts .. } -// 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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListDebugSessionsResponse) 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 "apigee.organizations.environments.apis.revisions.debugsessions.data.get": +// method id "apigee.organizations.environments.keystores.create": -type OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsKeystoresCreateCall struct { + s *Service + parent string + googlecloudapigeev1keystore *GoogleCloudApigeeV1Keystore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the debug data from a transaction. +// Create: Creates a keystore or truststore. - Keystore: Contains +// certificates and their associated keys. - Truststore: Contains +// trusted certificates used to validate a server's certificate. These +// certificates are typically self-signed certificates or certificates +// that are not signed by a trusted CA. // -// - name: The name of the debug session transaction. Must be of the -// form: -// `organizations/{organization}/environments/{environment}/apis/{api}/ -// revisions/{revision}/debugsessions/{session}/data/{transaction}`. -func (r *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataService) Get(name string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall { - c := &OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the environment in which to create the keystore. +// Use the following format in your request: +// `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsKeystoresService) Create(parent string, googlecloudapigeev1keystore *GoogleCloudApigeeV1Keystore) *OrganizationsEnvironmentsKeystoresCreateCall { + c := &OrganizationsEnvironmentsKeystoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1keystore = googlecloudapigeev1keystore + return c +} + +// Name sets the optional parameter "name": Name of the keystore. +// Overrides the value in Keystore. +func (c *OrganizationsEnvironmentsKeystoresCreateCall) Name(name string) *OrganizationsEnvironmentsKeystoresCreateCall { + c.urlParams_.Set("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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall { +func (c *OrganizationsEnvironmentsKeystoresCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresCreateCall { 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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall { - 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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall { +func (c *OrganizationsEnvironmentsKeystoresCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeystoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeystoresCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1keystore) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keystores") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.apis.revisions.debugsessions.data.get" call. -// Exactly one of *GoogleCloudApigeeV1DebugSessionTransaction or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1DebugSessionTransaction.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 *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DebugSessionTransaction, error) { +// Do executes the "apigee.organizations.environments.keystores.create" call. +// Exactly one of *GoogleCloudApigeeV1Keystore or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1Keystore.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 *OrganizationsEnvironmentsKeystoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Keystore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31764,7 +35115,7 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DebugSessionTransaction{ + ret := &GoogleCloudApigeeV1Keystore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31776,25 +35127,33 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) Do(opts } return ret, nil // { - // "description": "Gets the debug data from a transaction.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/debugsessions/{debugsessionsId}/data/{dataId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.apis.revisions.debugsessions.data.get", + // "description": "Creates a keystore or truststore. - Keystore: Contains certificates and their associated keys. - Truststore: Contains trusted certificates used to validate a server's certificate. These certificates are typically self-signed certificates or certificates that are not signed by a trusted CA.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.keystores.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "name": { - // "description": "Required. The name of the debug session transaction. Must be of the form: `organizations/{organization}/environments/{environment}/apis/{api}/revisions/{revision}/debugsessions/{session}/data/{transaction}`.", + // "description": "Optional. Name of the keystore. Overrides the value in Keystore.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of the environment in which to create the keystore. Use the following format in your request: `organizations/{org}/environments/{env}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+/debugsessions/[^/]+/data/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/keystores", + // "request": { + // "$ref": "GoogleCloudApigeeV1Keystore" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1DebugSessionTransaction" + // "$ref": "GoogleCloudApigeeV1Keystore" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31803,52 +35162,31 @@ func (c *OrganizationsEnvironmentsApisRevisionsDebugsessionsDataGetCall) Do(opts } -// method id "apigee.organizations.environments.apis.revisions.deployments.generateDeployChangeReport": - -type OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} +// method id "apigee.organizations.environments.keystores.delete": -// GenerateDeployChangeReport: Generates a report for a dry run analysis -// of a DeployApiProxy request without committing the deployment. In -// addition to the standard validations performed when adding -// deployments, additional analysis will be done to detect possible -// traffic routing changes that would result from this deployment being -// created. Any potential routing conflicts or unsafe changes will be -// reported in the response. This routing analysis is not performed for -// a non-dry-run DeployApiProxy request. For a request path -// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/dep -// loyments:generateDeployChangeReport`, two permissions are required: * -// `apigee.deployments.create` on the resource -// `organizations/{org}/environments/{env}` * -// `apigee.proxyrevisions.deploy` on the resource -// `organizations/{org}/apis/{api}/revisions/{rev}` -// -// - name: Name of the API proxy revision deployment in the following -// format: -// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`. -func (r *OrganizationsEnvironmentsApisRevisionsDeploymentsService) GenerateDeployChangeReport(name string) *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall { - c := &OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +type OrganizationsEnvironmentsKeystoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Override sets the optional parameter "override": Flag that specifies -// whether to force the deployment of the new revision over the -// currently deployed revision by overriding conflict checks. -func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall) Override(override bool) *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall { - c.urlParams_.Set("override", fmt.Sprint(override)) +// Delete: Deletes a keystore or truststore. +// +// - name: Name of the keystore. Use the following format in your +// request: +// `organizations/{org}/environments/{env}/keystores/{keystore}`. +func (r *OrganizationsEnvironmentsKeystoresService) Delete(name string) *OrganizationsEnvironmentsKeystoresDeleteCall { + c := &OrganizationsEnvironmentsKeystoresDeleteCall{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 *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall { +func (c *OrganizationsEnvironmentsKeystoresDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31856,21 +35194,21 @@ func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeRe // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall { +func (c *OrganizationsEnvironmentsKeystoresDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeystoresDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeystoresDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -31880,9 +35218,9 @@ func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeRe var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/deployments:generateDeployChangeReport") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -31893,16 +35231,14 @@ func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeRe return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.apis.revisions.deployments.generateDeployChangeReport" call. -// Exactly one of *GoogleCloudApigeeV1DeploymentChangeReport or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1DeploymentChangeReport.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 *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeReportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeploymentChangeReport, error) { +// Do executes the "apigee.organizations.environments.keystores.delete" call. +// Exactly one of *GoogleCloudApigeeV1Keystore or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1Keystore.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 *OrganizationsEnvironmentsKeystoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Keystore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31921,7 +35257,7 @@ func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeRe if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeploymentChangeReport{ + ret := &GoogleCloudApigeeV1Keystore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31933,30 +35269,25 @@ func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeRe } return ret, nil // { - // "description": "Generates a report for a dry run analysis of a DeployApiProxy request without committing the deployment. In addition to the standard validations performed when adding deployments, additional analysis will be done to detect possible traffic routing changes that would result from this deployment being created. Any potential routing conflicts or unsafe changes will be reported in the response. This routing analysis is not performed for a non-dry-run DeployApiProxy request. For a request path `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/deployments:generateDeployChangeReport`, two permissions are required: * `apigee.deployments.create` on the resource `organizations/{org}/environments/{env}` * `apigee.proxyrevisions.deploy` on the resource `organizations/{org}/apis/{api}/revisions/{rev}`", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/deployments:generateDeployChangeReport", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.apis.revisions.deployments.generateDeployChangeReport", + // "description": "Deletes a keystore or truststore.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.environments.keystores.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Name of the API proxy revision deployment in the following format: `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`", + // "description": "Required. Name of the keystore. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+$", // "required": true, // "type": "string" - // }, - // "override": { - // "description": "Flag that specifies whether to force the deployment of the new revision over the currently deployed revision by overriding conflict checks.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1/{+name}/deployments:generateDeployChangeReport", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1DeploymentChangeReport" + // "$ref": "GoogleCloudApigeeV1Keystore" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31965,37 +35296,24 @@ func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateDeployChangeRe } -// method id "apigee.organizations.environments.apis.revisions.deployments.generateUndeployChangeReport": +// method id "apigee.organizations.environments.keystores.get": -type OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsKeystoresGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// GenerateUndeployChangeReport: Generates a report for a dry run -// analysis of an UndeployApiProxy request without committing the -// undeploy. In addition to the standard validations performed when -// removing deployments, additional analysis will be done to detect -// possible traffic routing changes that would result from this -// deployment being removed. Any potential routing conflicts or unsafe -// changes will be reported in the response. This routing analysis is -// not performed for a non-dry-run UndeployApiProxy request. For a -// request path -// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/dep -// loyments:generateUndeployChangeReport`, two permissions are required: -// * `apigee.deployments.delete` on the resource -// `organizations/{org}/environments/{env}` * -// `apigee.proxyrevisions.undeploy` on the resource -// `organizations/{org}/apis/{api}/revisions/{rev}` +// Get: Gets a keystore or truststore. // -// - name: Name of the API proxy revision deployment in the following -// format: -// `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`. -func (r *OrganizationsEnvironmentsApisRevisionsDeploymentsService) GenerateUndeployChangeReport(name string) *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall { - c := &OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the keystore. Use the following format in your +// request: +// `organizations/{org}/environments/{env}/keystores/{keystore}`. +func (r *OrganizationsEnvironmentsKeystoresService) Get(name string) *OrganizationsEnvironmentsKeystoresGetCall { + c := &OrganizationsEnvironmentsKeystoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -32003,41 +35321,54 @@ func (r *OrganizationsEnvironmentsApisRevisionsDeploymentsService) GenerateUndep // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall { +func (c *OrganizationsEnvironmentsKeystoresGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresGetCall { 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 *OrganizationsEnvironmentsKeystoresGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsKeystoresGetCall { + 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 *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall) Context(ctx context.Context) *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall { +func (c *OrganizationsEnvironmentsKeystoresGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeystoresGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeystoresGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}/deployments:generateUndeployChangeReport") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -32048,16 +35379,14 @@ func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChange return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.apis.revisions.deployments.generateUndeployChangeReport" call. -// Exactly one of *GoogleCloudApigeeV1DeploymentChangeReport or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1DeploymentChangeReport.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 *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChangeReportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeploymentChangeReport, error) { +// Do executes the "apigee.organizations.environments.keystores.get" call. +// Exactly one of *GoogleCloudApigeeV1Keystore or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1Keystore.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 *OrganizationsEnvironmentsKeystoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Keystore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32076,7 +35405,7 @@ func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChange if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeploymentChangeReport{ + ret := &GoogleCloudApigeeV1Keystore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32088,25 +35417,25 @@ func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChange } return ret, nil // { - // "description": "Generates a report for a dry run analysis of an UndeployApiProxy request without committing the undeploy. In addition to the standard validations performed when removing deployments, additional analysis will be done to detect possible traffic routing changes that would result from this deployment being removed. Any potential routing conflicts or unsafe changes will be reported in the response. This routing analysis is not performed for a non-dry-run UndeployApiProxy request. For a request path `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/deployments:generateUndeployChangeReport`, two permissions are required: * `apigee.deployments.delete` on the resource `organizations/{org}/environments/{env}` * `apigee.proxyrevisions.undeploy` on the resource `organizations/{org}/apis/{api}/revisions/{rev}`", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/apis/{apisId}/revisions/{revisionsId}/deployments:generateUndeployChangeReport", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.apis.revisions.deployments.generateUndeployChangeReport", + // "description": "Gets a keystore or truststore.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.keystores.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Name of the API proxy revision deployment in the following format: `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`", + // "description": "Required. Name of the keystore. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/apis/[^/]+/revisions/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}/deployments:generateUndeployChangeReport", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1DeploymentChangeReport" + // "$ref": "GoogleCloudApigeeV1Keystore" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -32115,31 +35444,91 @@ func (c *OrganizationsEnvironmentsApisRevisionsDeploymentsGenerateUndeployChange } -// method id "apigee.organizations.environments.archiveDeployments.create": +// method id "apigee.organizations.environments.keystores.aliases.create": -type OrganizationsEnvironmentsArchiveDeploymentsCreateCall struct { - s *Service - parent string - googlecloudapigeev1archivedeployment *GoogleCloudApigeeV1ArchiveDeployment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsKeystoresAliasesCreateCall struct { + s *Service + parent string + googleapihttpbody *GoogleApiHttpBody + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new ArchiveDeployment. +// Create: Creates an alias from a key/certificate pair. The structure +// of the request is controlled by the `format` query parameter: - +// `keycertfile` - Separate PEM-encoded key and certificate files are +// uploaded. Set `Content-Type: multipart/form-data` and include the +// `keyFile`, `certFile`, and `password` (if keys are encrypted) fields +// in the request body. If uploading to a truststore, omit `keyFile`. - +// `pkcs12` - A PKCS12 file is uploaded. Set `Content-Type: +// multipart/form-data`, provide the file in the `file` field, and +// include the `password` field if the file is encrypted in the request +// body. - `selfsignedcert` - A new private key and certificate are +// generated. Set `Content-Type: application/json` and include +// CertificateGenerationSpec in the request body. // -// - parent: The Environment this Archive Deployment will be created in. -func (r *OrganizationsEnvironmentsArchiveDeploymentsService) Create(parent string, googlecloudapigeev1archivedeployment *GoogleCloudApigeeV1ArchiveDeployment) *OrganizationsEnvironmentsArchiveDeploymentsCreateCall { - c := &OrganizationsEnvironmentsArchiveDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the keystore. Use the following format in your +// request: +// `organizations/{org}/environments/{env}/keystores/{keystore}`. +func (r *OrganizationsEnvironmentsKeystoresAliasesService) Create(parent string, googleapihttpbody *GoogleApiHttpBody) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { + c := &OrganizationsEnvironmentsKeystoresAliasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1archivedeployment = googlecloudapigeev1archivedeployment + c.googleapihttpbody = googleapihttpbody + return c +} + +// Password sets the optional parameter "_password": DEPRECATED: For +// improved security, specify the password in the request body instead +// of using the query parameter. To specify the password in the request +// body, set `Content-type: multipart/form-data` part with name +// `password`. Password for the private key file, if required. +func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Password(Password string) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { + c.urlParams_.Set("_password", Password) + return c +} + +// Alias sets the optional parameter "alias": Alias for the +// key/certificate pair. Values must match the regular expression +// `[\w\s-.]{1,255}`. This must be provided for all formats except +// `selfsignedcert`; self-signed certs may specify the alias in either +// this parameter or the JSON body. +func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Alias(alias string) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { + c.urlParams_.Set("alias", alias) + return c +} + +// Format sets the optional parameter "format": Required. Format of the +// data. Valid values include: `selfsignedcert`, `keycertfile`, or +// `pkcs12` +func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Format(format string) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { + c.urlParams_.Set("format", format) + return c +} + +// IgnoreExpiryValidation sets the optional parameter +// "ignoreExpiryValidation": Flag that specifies whether to ignore +// expiry validation. If set to `true`, no expiry validation will be +// performed. +func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) IgnoreExpiryValidation(ignoreExpiryValidation bool) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { + c.urlParams_.Set("ignoreExpiryValidation", fmt.Sprint(ignoreExpiryValidation)) + return c +} + +// IgnoreNewlineValidation sets the optional parameter +// "ignoreNewlineValidation": Flag that specifies whether to ignore +// newline validation. If set to `true`, no error is thrown when the +// file contains a certificate chain with no newline between each +// certificate. Defaults to `false`. +func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) IgnoreNewlineValidation(ignoreNewlineValidation bool) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { + c.urlParams_.Set("ignoreNewlineValidation", fmt.Sprint(ignoreNewlineValidation)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsArchiveDeploymentsCreateCall { +func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32147,21 +35536,21 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) Fields(s ...goog // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsArchiveDeploymentsCreateCall { +func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -32169,14 +35558,14 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) doRequest(alt st } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1archivedeployment) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) 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, "v1/{+parent}/archiveDeployments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/aliases") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -32189,14 +35578,14 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.archiveDeployments.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Do executes the "apigee.organizations.environments.keystores.aliases.create" call. +// Exactly one of *GoogleCloudApigeeV1Alias 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 +// *GoogleCloudApigeeV1Alias.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 *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Alias, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32215,7 +35604,7 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1Alias{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32227,28 +35616,53 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) Do(opts ...googl } return ret, nil // { - // "description": "Creates a new ArchiveDeployment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/archiveDeployments", + // "description": "Creates an alias from a key/certificate pair. The structure of the request is controlled by the `format` query parameter: - `keycertfile` - Separate PEM-encoded key and certificate files are uploaded. Set `Content-Type: multipart/form-data` and include the `keyFile`, `certFile`, and `password` (if keys are encrypted) fields in the request body. If uploading to a truststore, omit `keyFile`. - `pkcs12` - A PKCS12 file is uploaded. Set `Content-Type: multipart/form-data`, provide the file in the `file` field, and include the `password` field if the file is encrypted in the request body. - `selfsignedcert` - A new private key and certificate are generated. Set `Content-Type: application/json` and include CertificateGenerationSpec in the request body.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}/aliases", // "httpMethod": "POST", - // "id": "apigee.organizations.environments.archiveDeployments.create", + // "id": "apigee.organizations.environments.keystores.aliases.create", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "_password": { + // "description": "DEPRECATED: For improved security, specify the password in the request body instead of using the query parameter. To specify the password in the request body, set `Content-type: multipart/form-data` part with name `password`. Password for the private key file, if required.", + // "location": "query", + // "type": "string" + // }, + // "alias": { + // "description": "Alias for the key/certificate pair. Values must match the regular expression `[\\w\\s-.]{1,255}`. This must be provided for all formats except `selfsignedcert`; self-signed certs may specify the alias in either this parameter or the JSON body.", + // "location": "query", + // "type": "string" + // }, + // "format": { + // "description": "Required. Format of the data. Valid values include: `selfsignedcert`, `keycertfile`, or `pkcs12`", + // "location": "query", + // "type": "string" + // }, + // "ignoreExpiryValidation": { + // "description": "Flag that specifies whether to ignore expiry validation. If set to `true`, no expiry validation will be performed.", + // "location": "query", + // "type": "boolean" + // }, + // "ignoreNewlineValidation": { + // "description": "Flag that specifies whether to ignore newline validation. If set to `true`, no error is thrown when the file contains a certificate chain with no newline between each certificate. Defaults to `false`.", + // "location": "query", + // "type": "boolean" + // }, // "parent": { - // "description": "Required. The Environment this Archive Deployment will be created in.", + // "description": "Required. Name of the keystore. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/archiveDeployments", + // "path": "v1/{+parent}/aliases", // "request": { - // "$ref": "GoogleCloudApigeeV1ArchiveDeployment" + // "$ref": "GoogleApiHttpBody" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1Alias" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -32257,22 +35671,25 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsCreateCall) Do(opts ...googl } -// method id "apigee.organizations.environments.archiveDeployments.delete": +// method id "apigee.organizations.environments.keystores.aliases.csr": -type OrganizationsEnvironmentsArchiveDeploymentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsKeystoresAliasesCsrCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an archive deployment. +// Csr: Generates a PKCS #10 Certificate Signing Request for the private +// key in an alias. // -// - name: Name of the Archive Deployment in the following format: -// `organizations/{org}/environments/{env}/archiveDeployments/{id}`. -func (r *OrganizationsEnvironmentsArchiveDeploymentsService) Delete(name string) *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall { - c := &OrganizationsEnvironmentsArchiveDeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the alias. Use the following format in your request: +// `organizations/{org}/environments/{env}/keystores/{keystore}/aliases +// /{alias}`. +func (r *OrganizationsEnvironmentsKeystoresAliasesService) Csr(name string) *OrganizationsEnvironmentsKeystoresAliasesCsrCall { + c := &OrganizationsEnvironmentsKeystoresAliasesCsrCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -32280,41 +35697,54 @@ func (r *OrganizationsEnvironmentsArchiveDeploymentsService) Delete(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall { +func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresAliasesCsrCall { 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 *OrganizationsEnvironmentsKeystoresAliasesCsrCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsKeystoresAliasesCsrCall { + 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 *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall { +func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresAliasesCsrCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/csr") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -32325,14 +35755,14 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.archiveDeployments.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// Do executes the "apigee.organizations.environments.keystores.aliases.csr" call. +// Exactly one of *GoogleApiHttpBody 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 +// *GoogleApiHttpBody.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 *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32351,7 +35781,7 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32363,25 +35793,25 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall) Do(opts ...googl } return ret, nil // { - // "description": "Deletes an archive deployment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/archiveDeployments/{archiveDeploymentsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.archiveDeployments.delete", + // "description": "Generates a PKCS #10 Certificate Signing Request for the private key in an alias.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}/aliases/{aliasesId}/csr", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.keystores.aliases.csr", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the Archive Deployment in the following format: `organizations/{org}/environments/{env}/archiveDeployments/{id}`.", + // "description": "Required. Name of the alias. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}/aliases/{alias}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/archiveDeployments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+/aliases/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}/csr", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleApiHttpBody" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -32390,34 +35820,31 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsDeleteCall) Do(opts ...googl } -// method id "apigee.organizations.environments.archiveDeployments.generateDownloadUrl": +// method id "apigee.organizations.environments.keystores.aliases.delete": -type OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall struct { - s *Service - name string - googlecloudapigeev1generatedownloadurlrequest *GoogleCloudApigeeV1GenerateDownloadUrlRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsKeystoresAliasesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GenerateDownloadUrl: Generates a signed URL for downloading the -// original zip file used to create an Archive Deployment. The URL is -// only valid for a limited period and should be used within minutes -// after generation. Each call returns a new upload URL. +// Delete: Deletes an alias. // -// - name: The name of the Archive Deployment you want to download. -func (r *OrganizationsEnvironmentsArchiveDeploymentsService) GenerateDownloadUrl(name string, googlecloudapigeev1generatedownloadurlrequest *GoogleCloudApigeeV1GenerateDownloadUrlRequest) *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall { - c := &OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the alias. Use the following format in your request: +// `organizations/{org}/environments/{env}/keystores/{keystore}/aliases +// /{alias}`. +func (r *OrganizationsEnvironmentsKeystoresAliasesService) Delete(name string) *OrganizationsEnvironmentsKeystoresAliasesDeleteCall { + c := &OrganizationsEnvironmentsKeystoresAliasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1generatedownloadurlrequest = googlecloudapigeev1generatedownloadurlrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall { +func (c *OrganizationsEnvironmentsKeystoresAliasesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresAliasesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32425,21 +35852,21 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) Context(ctx context.Context) *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall { +func (c *OrganizationsEnvironmentsKeystoresAliasesDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresAliasesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeystoresAliasesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeystoresAliasesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -32447,16 +35874,11 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) doR } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1generatedownloadurlrequest) - 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, "v1/{+name}:generateDownloadUrl") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -32467,16 +35889,14 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) doR return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.archiveDeployments.generateDownloadUrl" call. -// Exactly one of *GoogleCloudApigeeV1GenerateDownloadUrlResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1GenerateDownloadUrlResponse.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 *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1GenerateDownloadUrlResponse, error) { +// Do executes the "apigee.organizations.environments.keystores.aliases.delete" call. +// Exactly one of *GoogleCloudApigeeV1Alias or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1Alias.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 *OrganizationsEnvironmentsKeystoresAliasesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Alias, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32495,7 +35915,7 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) Do( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1GenerateDownloadUrlResponse{ + ret := &GoogleCloudApigeeV1Alias{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32507,28 +35927,25 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) Do( } return ret, nil // { - // "description": "Generates a signed URL for downloading the original zip file used to create an Archive Deployment. The URL is only valid for a limited period and should be used within minutes after generation. Each call returns a new upload URL.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/archiveDeployments/{archiveDeploymentsId}:generateDownloadUrl", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.archiveDeployments.generateDownloadUrl", + // "description": "Deletes an alias.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}/aliases/{aliasesId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.environments.keystores.aliases.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the Archive Deployment you want to download.", + // "description": "Required. Name of the alias. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}/aliases/{alias}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/archiveDeployments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+/aliases/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:generateDownloadUrl", - // "request": { - // "$ref": "GoogleCloudApigeeV1GenerateDownloadUrlRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1GenerateDownloadUrlResponse" + // "$ref": "GoogleCloudApigeeV1Alias" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -32537,103 +35954,97 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateDownloadUrlCall) Do( } -// method id "apigee.organizations.environments.archiveDeployments.generateUploadUrl": - -type OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall struct { - s *Service - parent string - googlecloudapigeev1generateuploadurlrequest *GoogleCloudApigeeV1GenerateUploadUrlRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} +// method id "apigee.organizations.environments.keystores.aliases.get": -// GenerateUploadUrl: Generates a signed URL for uploading an Archive -// zip file to Google Cloud Storage. Once the upload is complete, the -// signed URL should be passed to CreateArchiveDeployment. When -// uploading to the generated signed URL, please follow these -// restrictions: * Source file type should be a zip file. * Source file -// size should not exceed 1GB limit. * No credentials should be attached -// - the signed URLs provide access to the target bucket using internal -// service identity; if credentials were attached, the identity from the -// credentials would be used, but that identity does not have -// permissions to upload files to the URL. When making a HTTP PUT -// request, these two headers need to be specified: * `content-type: -// application/zip` * `x-goog-content-length-range: 0,1073741824` And -// this header SHOULD NOT be specified: * `Authorization: Bearer -// YOUR_TOKEN` +type OrganizationsEnvironmentsKeystoresAliasesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an alias. // -// - parent: The organization and environment to upload to. -func (r *OrganizationsEnvironmentsArchiveDeploymentsService) GenerateUploadUrl(parent string, googlecloudapigeev1generateuploadurlrequest *GoogleCloudApigeeV1GenerateUploadUrlRequest) *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall { - c := &OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1generateuploadurlrequest = googlecloudapigeev1generateuploadurlrequest +// - name: Name of the alias. Use the following format in your request: +// `organizations/{org}/environments/{env}/keystores/{keystore}/aliases +// /{alias}`. +func (r *OrganizationsEnvironmentsKeystoresAliasesService) Get(name string) *OrganizationsEnvironmentsKeystoresAliasesGetCall { + c := &OrganizationsEnvironmentsKeystoresAliasesGetCall{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 *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall { +func (c *OrganizationsEnvironmentsKeystoresAliasesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresAliasesGetCall { 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 *OrganizationsEnvironmentsKeystoresAliasesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsKeystoresAliasesGetCall { + 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 *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall) Context(ctx context.Context) *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall { +func (c *OrganizationsEnvironmentsKeystoresAliasesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresAliasesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeystoresAliasesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeystoresAliasesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1generateuploadurlrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/archiveDeployments:generateUploadUrl") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.archiveDeployments.generateUploadUrl" call. -// Exactly one of *GoogleCloudApigeeV1GenerateUploadUrlResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1GenerateUploadUrlResponse.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 *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1GenerateUploadUrlResponse, error) { +// Do executes the "apigee.organizations.environments.keystores.aliases.get" call. +// Exactly one of *GoogleCloudApigeeV1Alias or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1Alias.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 *OrganizationsEnvironmentsKeystoresAliasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Alias, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32652,7 +36063,7 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1GenerateUploadUrlResponse{ + ret := &GoogleCloudApigeeV1Alias{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32664,28 +36075,25 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall) Do(op } return ret, nil // { - // "description": "Generates a signed URL for uploading an Archive zip file to Google Cloud Storage. Once the upload is complete, the signed URL should be passed to CreateArchiveDeployment. When uploading to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * Source file size should not exceed 1GB limit. * No credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, these two headers need to be specified: * `content-type: application/zip` * `x-goog-content-length-range: 0,1073741824` And this header SHOULD NOT be specified: * `Authorization: Bearer YOUR_TOKEN`", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/archiveDeployments:generateUploadUrl", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.archiveDeployments.generateUploadUrl", + // "description": "Gets an alias.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}/aliases/{aliasesId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.keystores.aliases.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The organization and environment to upload to.", + // "name": { + // "description": "Required. Name of the alias. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}/aliases/{alias}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+/aliases/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/archiveDeployments:generateUploadUrl", - // "request": { - // "$ref": "GoogleCloudApigeeV1GenerateUploadUrlRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1GenerateUploadUrlResponse" + // "$ref": "GoogleCloudApigeeV1Alias" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -32694,9 +36102,9 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGenerateUploadUrlCall) Do(op } -// method id "apigee.organizations.environments.archiveDeployments.get": +// method id "apigee.organizations.environments.keystores.aliases.getCertificate": -type OrganizationsEnvironmentsArchiveDeploymentsGetCall struct { +type OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -32705,12 +36113,14 @@ type OrganizationsEnvironmentsArchiveDeploymentsGetCall struct { header_ http.Header } -// Get: Gets the specified ArchiveDeployment. +// GetCertificate: Gets the certificate from an alias in PEM-encoded +// form. // -// - name: Name of the Archive Deployment in the following format: -// `organizations/{org}/environments/{env}/archiveDeployments/{id}`. -func (r *OrganizationsEnvironmentsArchiveDeploymentsService) Get(name string) *OrganizationsEnvironmentsArchiveDeploymentsGetCall { - c := &OrganizationsEnvironmentsArchiveDeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the alias. Use the following format in your request: +// `organizations/{org}/environments/{env}/keystores/{keystore}/aliases +// /{alias}`. +func (r *OrganizationsEnvironmentsKeystoresAliasesService) GetCertificate(name string) *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall { + c := &OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -32718,7 +36128,7 @@ func (r *OrganizationsEnvironmentsArchiveDeploymentsService) Get(name string) *O // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsArchiveDeploymentsGetCall { +func (c *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32728,7 +36138,7 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) Fields(s ...googlea // 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 *OrganizationsEnvironmentsArchiveDeploymentsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsArchiveDeploymentsGetCall { +func (c *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall { c.ifNoneMatch_ = entityTag return c } @@ -32736,21 +36146,21 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) IfNoneMatch(entityT // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsArchiveDeploymentsGetCall { +func (c *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -32763,7 +36173,7 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) doRequest(alt strin var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/certificate") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -32776,15 +36186,14 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.archiveDeployments.get" call. -// Exactly one of *GoogleCloudApigeeV1ArchiveDeployment or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1ArchiveDeployment.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 *OrganizationsEnvironmentsArchiveDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ArchiveDeployment, error) { +// Do executes the "apigee.organizations.environments.keystores.aliases.getCertificate" call. +// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.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 *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32803,7 +36212,7 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ArchiveDeployment{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32815,25 +36224,25 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) Do(opts ...googleap } return ret, nil // { - // "description": "Gets the specified ArchiveDeployment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/archiveDeployments/{archiveDeploymentsId}", + // "description": "Gets the certificate from an alias in PEM-encoded form.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}/aliases/{aliasesId}/certificate", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.archiveDeployments.get", + // "id": "apigee.organizations.environments.keystores.aliases.getCertificate", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the Archive Deployment in the following format: `organizations/{org}/environments/{env}/archiveDeployments/{id}`.", + // "description": "Required. Name of the alias. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}/aliases/{alias}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/archiveDeployments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+/aliases/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}/certificate", // "response": { - // "$ref": "GoogleCloudApigeeV1ArchiveDeployment" + // "$ref": "GoogleApiHttpBody" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -32842,123 +36251,109 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsGetCall) Do(opts ...googleap } -// method id "apigee.organizations.environments.archiveDeployments.list": +// method id "apigee.organizations.environments.keystores.aliases.update": -type OrganizationsEnvironmentsArchiveDeploymentsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsKeystoresAliasesUpdateCall struct { + s *Service + name string + googleapihttpbody *GoogleApiHttpBody + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the ArchiveDeployments in the specified Environment. +// Update: Updates the certificate in an alias. // -// - parent: Name of the Environment for which to list Archive -// Deployments in the format: -// `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsArchiveDeploymentsService) List(parent string) *OrganizationsEnvironmentsArchiveDeploymentsListCall { - c := &OrganizationsEnvironmentsArchiveDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": An optional query used -// to return a subset of Archive Deployments using the semantics defined -// in https://google.aip.dev/160. -func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) Filter(filter string) *OrganizationsEnvironmentsArchiveDeploymentsListCall { - c.urlParams_.Set("filter", filter) +// - name: Name of the alias. Use the following format in your request: +// `organizations/{org}/environments/{env}/keystores/{keystore}/aliases +// /{alias}`. +func (r *OrganizationsEnvironmentsKeystoresAliasesService) Update(name string, googleapihttpbody *GoogleApiHttpBody) *OrganizationsEnvironmentsKeystoresAliasesUpdateCall { + c := &OrganizationsEnvironmentsKeystoresAliasesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleapihttpbody = googleapihttpbody return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// Archive Deployments to return. If unspecified, at most 25 deployments -// will be returned. -func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) PageSize(pageSize int64) *OrganizationsEnvironmentsArchiveDeploymentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// IgnoreExpiryValidation sets the optional parameter +// "ignoreExpiryValidation": Required. Flag that specifies whether to +// ignore expiry validation. If set to `true`, no expiry validation will +// be performed. +func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) IgnoreExpiryValidation(ignoreExpiryValidation bool) *OrganizationsEnvironmentsKeystoresAliasesUpdateCall { + c.urlParams_.Set("ignoreExpiryValidation", fmt.Sprint(ignoreExpiryValidation)) return c } -// PageToken sets the optional parameter "pageToken": Page token, -// returned from a previous ListArchiveDeployments call, that you can -// use to retrieve the next page. -func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) PageToken(pageToken string) *OrganizationsEnvironmentsArchiveDeploymentsListCall { - c.urlParams_.Set("pageToken", pageToken) +// IgnoreNewlineValidation sets the optional parameter +// "ignoreNewlineValidation": Flag that specifies whether to ignore +// newline validation. If set to `true`, no error is thrown when the +// file contains a certificate chain with no newline between each +// certificate. Defaults to `false`. +func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) IgnoreNewlineValidation(ignoreNewlineValidation bool) *OrganizationsEnvironmentsKeystoresAliasesUpdateCall { + c.urlParams_.Set("ignoreNewlineValidation", fmt.Sprint(ignoreNewlineValidation)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsArchiveDeploymentsListCall { +func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresAliasesUpdateCall { 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 *OrganizationsEnvironmentsArchiveDeploymentsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsArchiveDeploymentsListCall { - 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 *OrganizationsEnvironmentsArchiveDeploymentsListCall) Context(ctx context.Context) *OrganizationsEnvironmentsArchiveDeploymentsListCall { +func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresAliasesUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) + 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, "v1/{+parent}/archiveDeployments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.archiveDeployments.list" call. -// Exactly one of *GoogleCloudApigeeV1ListArchiveDeploymentsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListArchiveDeploymentsResponse.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 *OrganizationsEnvironmentsArchiveDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListArchiveDeploymentsResponse, error) { +// Do executes the "apigee.organizations.environments.keystores.aliases.update" call. +// Exactly one of *GoogleCloudApigeeV1Alias or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1Alias.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 *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Alias, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32977,7 +36372,7 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListArchiveDeploymentsResponse{ + ret := &GoogleCloudApigeeV1Alias{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32989,41 +36384,38 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) Do(opts ...googlea } return ret, nil // { - // "description": "Lists the ArchiveDeployments in the specified Environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/archiveDeployments", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.archiveDeployments.list", + // "description": "Updates the certificate in an alias.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}/aliases/{aliasesId}", + // "httpMethod": "PUT", + // "id": "apigee.organizations.environments.keystores.aliases.update", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Optional. An optional query used to return a subset of Archive Deployments using the semantics defined in https://google.aip.dev/160.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Maximum number of Archive Deployments to return. If unspecified, at most 25 deployments will be returned.", - // "format": "int32", + // "ignoreExpiryValidation": { + // "description": "Required. Flag that specifies whether to ignore expiry validation. If set to `true`, no expiry validation will be performed.", // "location": "query", - // "type": "integer" + // "type": "boolean" // }, - // "pageToken": { - // "description": "Optional. Page token, returned from a previous ListArchiveDeployments call, that you can use to retrieve the next page.", + // "ignoreNewlineValidation": { + // "description": "Flag that specifies whether to ignore newline validation. If set to `true`, no error is thrown when the file contains a certificate chain with no newline between each certificate. Defaults to `false`.", // "location": "query", - // "type": "string" + // "type": "boolean" // }, - // "parent": { - // "description": "Required. Name of the Environment for which to list Archive Deployments in the format: `organizations/{org}/environments/{env}`.", + // "name": { + // "description": "Required. Name of the alias. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}/aliases/{alias}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+/aliases/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/archiveDeployments", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleApiHttpBody" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ListArchiveDeploymentsResponse" + // "$ref": "GoogleCloudApigeeV1Alias" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -33032,61 +36424,33 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsListCall) Do(opts ...googlea } -// 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 *OrganizationsEnvironmentsArchiveDeploymentsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListArchiveDeploymentsResponse) 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 "apigee.organizations.environments.archiveDeployments.patch": +// method id "apigee.organizations.environments.keyvaluemaps.create": -type OrganizationsEnvironmentsArchiveDeploymentsPatchCall struct { - s *Service - name string - googlecloudapigeev1archivedeployment *GoogleCloudApigeeV1ArchiveDeployment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsKeyvaluemapsCreateCall struct { + s *Service + parent string + googlecloudapigeev1keyvaluemap *GoogleCloudApigeeV1KeyValueMap + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an existing ArchiveDeployment. Labels can modified but -// most of the other fields are not modifiable. +// Create: Creates a key value map in an environment. // -// - name: Name of the Archive Deployment in the following format: -// `organizations/{org}/environments/{env}/archiveDeployments/{id}`. -func (r *OrganizationsEnvironmentsArchiveDeploymentsService) Patch(name string, googlecloudapigeev1archivedeployment *GoogleCloudApigeeV1ArchiveDeployment) *OrganizationsEnvironmentsArchiveDeploymentsPatchCall { - c := &OrganizationsEnvironmentsArchiveDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1archivedeployment = googlecloudapigeev1archivedeployment - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The -// list of fields to be updated. -func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) UpdateMask(updateMask string) *OrganizationsEnvironmentsArchiveDeploymentsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: Name of the environment in which to create the key value +// map. Use the following structure in your request: +// `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsKeyvaluemapsService) Create(parent string, googlecloudapigeev1keyvaluemap *GoogleCloudApigeeV1KeyValueMap) *OrganizationsEnvironmentsKeyvaluemapsCreateCall { + c := &OrganizationsEnvironmentsKeyvaluemapsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1keyvaluemap = googlecloudapigeev1keyvaluemap return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsArchiveDeploymentsPatchCall { +func (c *OrganizationsEnvironmentsKeyvaluemapsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -33094,21 +36458,21 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) Fields(s ...googl // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) Context(ctx context.Context) *OrganizationsEnvironmentsArchiveDeploymentsPatchCall { +func (c *OrganizationsEnvironmentsKeyvaluemapsCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeyvaluemapsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeyvaluemapsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeyvaluemapsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -33116,35 +36480,34 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) doRequest(alt str } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1archivedeployment) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1keyvaluemap) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keyvaluemaps") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.archiveDeployments.patch" call. -// Exactly one of *GoogleCloudApigeeV1ArchiveDeployment or error will be +// Do executes the "apigee.organizations.environments.keyvaluemaps.create" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueMap or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1ArchiveDeployment.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 *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ArchiveDeployment, error) { +// either *GoogleCloudApigeeV1KeyValueMap.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 *OrganizationsEnvironmentsKeyvaluemapsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueMap, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33163,7 +36526,7 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ArchiveDeployment{ + ret := &GoogleCloudApigeeV1KeyValueMap{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33175,34 +36538,28 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) Do(opts ...google } return ret, nil // { - // "description": "Updates an existing ArchiveDeployment. Labels can modified but most of the other fields are not modifiable.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/archiveDeployments/{archiveDeploymentsId}", - // "httpMethod": "PATCH", - // "id": "apigee.organizations.environments.archiveDeployments.patch", + // "description": "Creates a key value map in an environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.keyvaluemaps.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Name of the Archive Deployment in the following format: `organizations/{org}/environments/{env}/archiveDeployments/{id}`.", + // "parent": { + // "description": "Required. Name of the environment in which to create the key value map. Use the following structure in your request: `organizations/{org}/environments/{env}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/archiveDeployments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The list of fields to be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/keyvaluemaps", // "request": { - // "$ref": "GoogleCloudApigeeV1ArchiveDeployment" + // "$ref": "GoogleCloudApigeeV1KeyValueMap" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ArchiveDeployment" + // "$ref": "GoogleCloudApigeeV1KeyValueMap" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -33211,9 +36568,9 @@ func (c *OrganizationsEnvironmentsArchiveDeploymentsPatchCall) Do(opts ...google } -// method id "apigee.organizations.environments.caches.delete": +// method id "apigee.organizations.environments.keyvaluemaps.delete": -type OrganizationsEnvironmentsCachesDeleteCall struct { +type OrganizationsEnvironmentsKeyvaluemapsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -33221,13 +36578,13 @@ type OrganizationsEnvironmentsCachesDeleteCall struct { header_ http.Header } -// Delete: Deletes a cache. +// Delete: Deletes a key value map from an environment. // -// - name: Cache resource name of the form: -// `organizations/{organization_id}/environments/{environment_id}/cache -// s/{cache_id}`. -func (r *OrganizationsEnvironmentsCachesService) Delete(name string) *OrganizationsEnvironmentsCachesDeleteCall { - c := &OrganizationsEnvironmentsCachesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the key value map. Use the following structure in +// your request: +// `organizations/{org}/environments/{env}/keyvaluemaps/{keyvaluemap}`. +func (r *OrganizationsEnvironmentsKeyvaluemapsService) Delete(name string) *OrganizationsEnvironmentsKeyvaluemapsDeleteCall { + c := &OrganizationsEnvironmentsKeyvaluemapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -33235,7 +36592,7 @@ func (r *OrganizationsEnvironmentsCachesService) Delete(name string) *Organizati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsCachesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsCachesDeleteCall { +func (c *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -33243,21 +36600,21 @@ func (c *OrganizationsEnvironmentsCachesDeleteCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsCachesDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsCachesDeleteCall { +func (c *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeyvaluemapsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsCachesDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsCachesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -33280,14 +36637,14 @@ func (c *OrganizationsEnvironmentsCachesDeleteCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.caches.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 +// Do executes the "apigee.organizations.environments.keyvaluemaps.delete" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueMap or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1KeyValueMap.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 *OrganizationsEnvironmentsCachesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueMap, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33306,7 +36663,7 @@ func (c *OrganizationsEnvironmentsCachesDeleteCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudApigeeV1KeyValueMap{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33318,25 +36675,25 @@ func (c *OrganizationsEnvironmentsCachesDeleteCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Deletes a cache.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/caches/{cachesId}", + // "description": "Deletes a key value map from an environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps/{keyvaluemapsId}", // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.caches.delete", + // "id": "apigee.organizations.environments.keyvaluemaps.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Cache resource name of the form: `organizations/{organization_id}/environments/{environment_id}/caches/{cache_id}`", + // "description": "Required. Name of the key value map. Use the following structure in your request: `organizations/{org}/environments/{env}/keyvaluemaps/{keyvaluemap}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/caches/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudApigeeV1KeyValueMap" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -33345,89 +36702,78 @@ func (c *OrganizationsEnvironmentsCachesDeleteCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.environments.deployments.list": +// method id "apigee.organizations.environments.keyvaluemaps.entries.create": -type OrganizationsEnvironmentsDeploymentsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall struct { + s *Service + parent string + googlecloudapigeev1keyvalueentry *GoogleCloudApigeeV1KeyValueEntry + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all deployments of API proxies or shared flows in an -// environment. +// Create: Creates key value entries in a key value map scoped to an +// organization, environment, or API proxy. // -// - parent: Name of the environment for which to return deployment -// information in the following format: -// `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsDeploymentsService) List(parent string) *OrganizationsEnvironmentsDeploymentsListCall { - c := &OrganizationsEnvironmentsDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Scope as indicated by the URI in which to create the key +// value map entry. Use **one** of the following structures in your +// request: * +// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}` +// . * +// `organizations/{organization}/environments/{environment}/keyvaluemap +// s/{keyvaluemap}` * +// `organizations/{organization}/keyvaluemaps/{keyvaluemap}`. +func (r *OrganizationsEnvironmentsKeyvaluemapsEntriesService) Create(parent string, googlecloudapigeev1keyvalueentry *GoogleCloudApigeeV1KeyValueEntry) *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall { + c := &OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// SharedFlows sets the optional parameter "sharedFlows": Flag that -// specifies whether to return shared flow or API proxy deployments. Set -// to `true` to return shared flow deployments; set to `false` to return -// API proxy deployments. Defaults to `false`. -func (c *OrganizationsEnvironmentsDeploymentsListCall) SharedFlows(sharedFlows bool) *OrganizationsEnvironmentsDeploymentsListCall { - c.urlParams_.Set("sharedFlows", fmt.Sprint(sharedFlows)) + c.googlecloudapigeev1keyvalueentry = googlecloudapigeev1keyvalueentry return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsDeploymentsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsDeploymentsListCall { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall { 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 *OrganizationsEnvironmentsDeploymentsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsDeploymentsListCall { - 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 *OrganizationsEnvironmentsDeploymentsListCall) Context(ctx context.Context) *OrganizationsEnvironmentsDeploymentsListCall { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsDeploymentsListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsDeploymentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1keyvalueentry) + 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, "v1/{+parent}/deployments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -33438,16 +36784,14 @@ func (c *OrganizationsEnvironmentsDeploymentsListCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.deployments.list" call. -// Exactly one of *GoogleCloudApigeeV1ListDeploymentsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListDeploymentsResponse.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 *OrganizationsEnvironmentsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeploymentsResponse, error) { +// Do executes the "apigee.organizations.environments.keyvaluemaps.entries.create" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1KeyValueEntry.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 *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33466,7 +36810,7 @@ func (c *OrganizationsEnvironmentsDeploymentsListCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListDeploymentsResponse{ + ret := &GoogleCloudApigeeV1KeyValueEntry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33478,30 +36822,28 @@ func (c *OrganizationsEnvironmentsDeploymentsListCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Lists all deployments of API proxies or shared flows in an environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/deployments", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.deployments.list", + // "description": "Creates key value entries in a key value map scoped to an organization, environment, or API proxy.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps/{keyvaluemapsId}/entries", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.keyvaluemaps.entries.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Name of the environment for which to return deployment information in the following format: `organizations/{org}/environments/{env}`", + // "description": "Required. Scope as indicated by the URI in which to create the key value map entry. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+$", // "required": true, // "type": "string" - // }, - // "sharedFlows": { - // "description": "Optional. Flag that specifies whether to return shared flow or API proxy deployments. Set to `true` to return shared flow deployments; set to `false` to return API proxy deployments. Defaults to `false`.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1/{+parent}/deployments", + // "path": "v1/{+parent}/entries", + // "request": { + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ListDeploymentsResponse" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -33510,33 +36852,41 @@ func (c *OrganizationsEnvironmentsDeploymentsListCall) Do(opts ...googleapi.Call } -// method id "apigee.organizations.environments.flowhooks.attachSharedFlowToFlowHook": +// method id "apigee.organizations.environments.keyvaluemaps.entries.delete": -type OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall struct { - s *Service - name string - googlecloudapigeev1flowhook *GoogleCloudApigeeV1FlowHook - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AttachSharedFlowToFlowHook: Attaches a shared flow to a flow hook. +// Delete: Deletes a key value entry from a key value map scoped to an +// organization, environment, or API proxy. **Note:** After you delete +// the key value entry, the policy consuming the entry will continue to +// function with its cached values for a few minutes. This is expected +// behavior. // -// - name: Name of the flow hook to which the shared flow should be -// attached in the following format: -// `organizations/{org}/environments/{env}/flowhooks/{flowhook}`. -func (r *OrganizationsEnvironmentsFlowhooksService) AttachSharedFlowToFlowHook(name string, googlecloudapigeev1flowhook *GoogleCloudApigeeV1FlowHook) *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall { - c := &OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Scope as indicated by the URI in which to delete the key +// value map entry. Use **one** of the following structures in your +// request: * +// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/ +// entries/{entry}`. * +// `organizations/{organization}/environments/{environment}/keyvaluemap +// s/{keyvaluemap}/entries/{entry}` * +// `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{en +// try}`. +func (r *OrganizationsEnvironmentsKeyvaluemapsEntriesService) Delete(name string) *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall { + c := &OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1flowhook = googlecloudapigeev1flowhook return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -33544,21 +36894,21 @@ func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) Context(ctx context.Context) *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -33566,16 +36916,11 @@ func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) doReq } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1flowhook) - 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -33586,14 +36931,14 @@ func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.flowhooks.attachSharedFlowToFlowHook" call. -// Exactly one of *GoogleCloudApigeeV1FlowHook or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1FlowHook.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 +// Do executes the "apigee.organizations.environments.keyvaluemaps.entries.delete" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1KeyValueEntry.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 *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1FlowHook, error) { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33612,7 +36957,7 @@ func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1FlowHook{ + ret := &GoogleCloudApigeeV1KeyValueEntry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33624,28 +36969,25 @@ func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) Do(op } return ret, nil // { - // "description": "Attaches a shared flow to a flow hook.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/flowhooks/{flowhooksId}", - // "httpMethod": "PUT", - // "id": "apigee.organizations.environments.flowhooks.attachSharedFlowToFlowHook", + // "description": "Deletes a key value entry from a key value map scoped to an organization, environment, or API proxy. **Note:** After you delete the key value entry, the policy consuming the entry will continue to function with its cached values for a few minutes. This is expected behavior.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.environments.keyvaluemaps.entries.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the flow hook to which the shared flow should be attached in the following format: `organizations/{org}/environments/{env}/flowhooks/{flowhook}`", + // "description": "Required. Scope as indicated by the URI in which to delete the key value map entry. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/entries/{entry}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}/entries/{entry}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{entry}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/flowhooks/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1FlowHook" - // }, // "response": { - // "$ref": "GoogleCloudApigeeV1FlowHook" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -33654,23 +36996,31 @@ func (c *OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall) Do(op } -// method id "apigee.organizations.environments.flowhooks.detachSharedFlowFromFlowHook": +// method id "apigee.organizations.environments.keyvaluemaps.entries.get": -type OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// DetachSharedFlowFromFlowHook: Detaches a shared flow from a flow -// hook. +// Get: Get the Key value entry value for org, env or apis scoped Key +// value map. // -// - name: Name of the flow hook to detach in the following format: -// `organizations/{org}/environments/{env}/flowhooks/{flowhook}`. -func (r *OrganizationsEnvironmentsFlowhooksService) DetachSharedFlowFromFlowHook(name string) *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall { - c := &OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Scope as indicated by the URI in which to fetch the key value +// map entry/value. Use **one** of the following structures in your +// request: * +// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/ +// entries/{entry}`. * +// `organizations/{organization}/environments/{environment}/keyvaluemap +// s/{keyvaluemap}/entries/{entry}` * +// `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{en +// try}`. +func (r *OrganizationsEnvironmentsKeyvaluemapsEntriesService) Get(name string) *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall { + c := &OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -33678,41 +37028,54 @@ func (r *OrganizationsEnvironmentsFlowhooksService) DetachSharedFlowFromFlowHook // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall { 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 *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall { + 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 *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall) Context(ctx context.Context) *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -33723,14 +37086,14 @@ func (c *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall) doR return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.flowhooks.detachSharedFlowFromFlowHook" call. -// Exactly one of *GoogleCloudApigeeV1FlowHook or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1FlowHook.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 +// Do executes the "apigee.organizations.environments.keyvaluemaps.entries.get" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1KeyValueEntry.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 *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1FlowHook, error) { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33749,7 +37112,7 @@ func (c *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall) Do( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1FlowHook{ + ret := &GoogleCloudApigeeV1KeyValueEntry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33761,25 +37124,25 @@ func (c *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall) Do( } return ret, nil // { - // "description": "Detaches a shared flow from a flow hook.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/flowhooks/{flowhooksId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.flowhooks.detachSharedFlowFromFlowHook", + // "description": "Get the Key value entry value for org, env or apis scoped Key value map.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.keyvaluemaps.entries.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the flow hook to detach in the following format: `organizations/{org}/environments/{env}/flowhooks/{flowhook}`", + // "description": "Required. Scope as indicated by the URI in which to fetch the key value map entry/value. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/entries/{entry}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}/entries/{entry}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{entry}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/flowhooks/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1FlowHook" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -33788,34 +37151,53 @@ func (c *OrganizationsEnvironmentsFlowhooksDetachSharedFlowFromFlowHookCall) Do( } -// method id "apigee.organizations.environments.flowhooks.get": +// method id "apigee.organizations.environments.keyvaluemaps.entries.list": -type OrganizationsEnvironmentsFlowhooksGetCall struct { +type OrganizationsEnvironmentsKeyvaluemapsEntriesListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the name of the shared flow attached to the specified -// flow hook. If there's no shared flow attached to the flow hook, the -// API does not return an error; it simply does not return a name in the -// response. +// List: Lists key value entries for key values maps scoped to an +// organization, environment, or API proxy. // -// - name: Name of the flow hook in the following format: -// `organizations/{org}/environments/{env}/flowhooks/{flowhook}`. -func (r *OrganizationsEnvironmentsFlowhooksService) Get(name string) *OrganizationsEnvironmentsFlowhooksGetCall { - c := &OrganizationsEnvironmentsFlowhooksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Scope as indicated by the URI in which to list key value +// maps. Use **one** of the following structures in your request: * +// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}` +// . * +// `organizations/{organization}/environments/{environment}/keyvaluemap +// s/{keyvaluemap}` * +// `organizations/{organization}/keyvaluemaps/{keyvaluemap}`. +func (r *OrganizationsEnvironmentsKeyvaluemapsEntriesService) List(parent string) *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall { + c := &OrganizationsEnvironmentsKeyvaluemapsEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// key value entries to return. If unspecified, at most 100 entries will +// be returned. +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) PageSize(pageSize int64) *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token. If +// provides, must be a valid key value entry returned from a previous +// call that can be used to retrieve the next page. +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) PageToken(pageToken string) *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall { + 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 *OrganizationsEnvironmentsFlowhooksGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsFlowhooksGetCall { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -33825,7 +37207,7 @@ func (c *OrganizationsEnvironmentsFlowhooksGetCall) Fields(s ...googleapi.Field) // 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 *OrganizationsEnvironmentsFlowhooksGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsFlowhooksGetCall { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall { c.ifNoneMatch_ = entityTag return c } @@ -33833,21 +37215,21 @@ func (c *OrganizationsEnvironmentsFlowhooksGetCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsFlowhooksGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsFlowhooksGetCall { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsFlowhooksGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsFlowhooksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -33860,7 +37242,7 @@ func (c *OrganizationsEnvironmentsFlowhooksGetCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -33868,19 +37250,21 @@ func (c *OrganizationsEnvironmentsFlowhooksGetCall) doRequest(alt string) (*http } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.flowhooks.get" call. -// Exactly one of *GoogleCloudApigeeV1FlowHook or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1FlowHook.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 *OrganizationsEnvironmentsFlowhooksGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1FlowHook, error) { +// Do executes the "apigee.organizations.environments.keyvaluemaps.entries.list" call. +// Exactly one of *GoogleCloudApigeeV1ListKeyValueEntriesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListKeyValueEntriesResponse.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 *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListKeyValueEntriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33899,7 +37283,7 @@ func (c *OrganizationsEnvironmentsFlowhooksGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1FlowHook{ + ret := &GoogleCloudApigeeV1ListKeyValueEntriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33911,25 +37295,36 @@ func (c *OrganizationsEnvironmentsFlowhooksGetCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Returns the name of the shared flow attached to the specified flow hook. If there's no shared flow attached to the flow hook, the API does not return an error; it simply does not return a name in the response.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/flowhooks/{flowhooksId}", + // "description": "Lists key value entries for key values maps scoped to an organization, environment, or API proxy.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps/{keyvaluemapsId}/entries", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.flowhooks.get", + // "id": "apigee.organizations.environments.keyvaluemaps.entries.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the flow hook in the following format: `organizations/{org}/environments/{env}/flowhooks/{flowhook}`", + // "pageSize": { + // "description": "Optional. Maximum number of key value entries to return. If unspecified, at most 100 entries will be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page token. If provides, must be a valid key value entry returned from a previous call that can be used to retrieve the next page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Scope as indicated by the URI in which to list key value maps. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/flowhooks/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/entries", // "response": { - // "$ref": "GoogleCloudApigeeV1FlowHook" + // "$ref": "GoogleCloudApigeeV1ListKeyValueEntriesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -33938,101 +37333,238 @@ func (c *OrganizationsEnvironmentsFlowhooksGetCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.environments.keystores.create": +// 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 *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListKeyValueEntriesResponse) 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) + } +} -type OrganizationsEnvironmentsKeystoresCreateCall struct { - s *Service - parent string - googlecloudapigeev1keystore *GoogleCloudApigeeV1Keystore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "apigee.organizations.environments.optimizedStats.get": + +type OrganizationsEnvironmentsOptimizedStatsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Similar to GetStats except that the response is less verbose. +// +// - name: Resource name for which the interactive query will be +// executed. Use the following format in your request: +// `organizations/{org}/environments/{env}/optimizedStats/{dimensions}` +// Dimensions let you view metrics in meaningful groupings, such as +// `apiproxy`, `target_host`. The value of `dimensions` should be a +// comma-separated list as shown below: +// `organizations/{org}/environments/{env}/optimizedStats/apiproxy,requ +// est_verb`. +func (r *OrganizationsEnvironmentsOptimizedStatsService) Get(name string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c := &OrganizationsEnvironmentsOptimizedStatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Accuracy sets the optional parameter "accuracy": No longer used by +// Apigee. Supported for backwards compatibility. +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Accuracy(accuracy string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("accuracy", accuracy) + return c +} + +// AggTable sets the optional parameter "aggTable": Table name used to +// query custom aggregate tables. If this parameter is skipped, then +// Apigee will try to retrieve the data from fact tables which will be +// expensive. +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) AggTable(aggTable string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("aggTable", aggTable) + return c +} + +// Filter sets the optional parameter "filter": Filter that enables you +// to drill-down on specific dimension values. +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Filter(filter string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("filter", filter) + return c +} + +// Limit sets the optional parameter "limit": Maximum number of result +// items to return. The default and maximum value that can be returned +// is 14400. +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Limit(limit string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("limit", limit) + return c +} + +// Offset sets the optional parameter "offset": Offset value. Use +// `offset` with `limit` to enable pagination of results. For example, +// to display results 11-20, set limit to `10` and offset to `10`. +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Offset(offset string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("offset", offset) + return c +} + +// Realtime sets the optional parameter "realtime": No longer used by +// Apigee. Supported for backwards compatibility. +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Realtime(realtime bool) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("realtime", fmt.Sprint(realtime)) + return c +} + +// Select sets the optional parameter "select": Required. +// Comma-separated list of metrics. For example: +// `sum(message_count),sum(error_count)` +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Select(select_ string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("select", select_) + return c +} + +// Sonar sets the optional parameter "sonar": Routes the query to API +// Monitoring for the last hour. +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Sonar(sonar bool) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("sonar", fmt.Sprint(sonar)) + return c +} + +// Sort sets the optional parameter "sort": Flag that specifies whether +// the sort order should be ascending or descending. Valid values +// include `DESC` and `ASC`. +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Sort(sort string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("sort", sort) + return c +} + +// Sortby sets the optional parameter "sortby": Comma-separated list of +// columns to sort the final result. +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Sortby(sortby string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("sortby", sortby) + return c +} + +// TimeRange sets the optional parameter "timeRange": Required. Time +// interval for the interactive query. Time range is specified in GMT as +// `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59` +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) TimeRange(timeRange string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("timeRange", timeRange) + return c +} + +// TimeUnit sets the optional parameter "timeUnit": Granularity of +// metrics returned. Valid values include: `second`, `minute`, `hour`, +// `day`, `week`, or `month`. +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) TimeUnit(timeUnit string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("timeUnit", timeUnit) + return c } -// Create: Creates a keystore or truststore. - Keystore: Contains -// certificates and their associated keys. - Truststore: Contains -// trusted certificates used to validate a server's certificate. These -// certificates are typically self-signed certificates or certificates -// that are not signed by a trusted CA. -// -// - parent: Name of the environment in which to create the keystore. -// Use the following format in your request: -// `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsKeystoresService) Create(parent string, googlecloudapigeev1keystore *GoogleCloudApigeeV1Keystore) *OrganizationsEnvironmentsKeystoresCreateCall { - c := &OrganizationsEnvironmentsKeystoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1keystore = googlecloudapigeev1keystore +// Topk sets the optional parameter "topk": Top number of results to +// return. For example, to return the top 5 results, set `topk=5`. +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Topk(topk string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("topk", topk) return c } -// Name sets the optional parameter "name": Name of the keystore. -// Overrides the value in Keystore. -func (c *OrganizationsEnvironmentsKeystoresCreateCall) Name(name string) *OrganizationsEnvironmentsKeystoresCreateCall { - c.urlParams_.Set("name", name) +// TsAscending sets the optional parameter "tsAscending": Flag that +// specifies whether to list timestamps in ascending (`true`) or +// descending (`false`) order. Apigee recommends setting this value to +// `true` if you are using `sortby` with `sort=DESC`. +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) TsAscending(tsAscending bool) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("tsAscending", fmt.Sprint(tsAscending)) + return c +} + +// Tzo sets the optional parameter "tzo": Timezone offset value. +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Tzo(tzo string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("tzo", tzo) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsKeystoresCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresCreateCall { +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsOptimizedStatsGetCall { 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 *OrganizationsEnvironmentsOptimizedStatsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + 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 *OrganizationsEnvironmentsKeystoresCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresCreateCall { +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsOptimizedStatsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeystoresCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeystoresCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1keystore) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keystores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keystores.create" call. -// Exactly one of *GoogleCloudApigeeV1Keystore or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1Keystore.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 *OrganizationsEnvironmentsKeystoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Keystore, error) { +// Do executes the "apigee.organizations.environments.optimizedStats.get" call. +// Exactly one of *GoogleCloudApigeeV1OptimizedStats or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1OptimizedStats.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 *OrganizationsEnvironmentsOptimizedStatsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1OptimizedStats, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34051,7 +37583,7 @@ func (c *OrganizationsEnvironmentsKeystoresCreateCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Keystore{ + ret := &GoogleCloudApigeeV1OptimizedStats{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34063,33 +37595,100 @@ func (c *OrganizationsEnvironmentsKeystoresCreateCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Creates a keystore or truststore. - Keystore: Contains certificates and their associated keys. - Truststore: Contains trusted certificates used to validate a server's certificate. These certificates are typically self-signed certificates or certificates that are not signed by a trusted CA.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.keystores.create", + // "description": "Similar to GetStats except that the response is less verbose.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/optimizedStats/{optimizedStatsId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.optimizedStats.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "name": { - // "description": "Optional. Name of the keystore. Overrides the value in Keystore.", + // "accuracy": { + // "description": "No longer used by Apigee. Supported for backwards compatibility.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. Name of the environment in which to create the keystore. Use the following format in your request: `organizations/{org}/environments/{env}`", + // "aggTable": { + // "description": "Table name used to query custom aggregate tables. If this parameter is skipped, then Apigee will try to retrieve the data from fact tables which will be expensive.", + // "location": "query", + // "type": "string" + // }, + // "filter": { + // "description": "Filter that enables you to drill-down on specific dimension values.", + // "location": "query", + // "type": "string" + // }, + // "limit": { + // "description": "Maximum number of result items to return. The default and maximum value that can be returned is 14400.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. Resource name for which the interactive query will be executed. Use the following format in your request: `organizations/{org}/environments/{env}/optimizedStats/{dimensions}` Dimensions let you view metrics in meaningful groupings, such as `apiproxy`, `target_host`. The value of `dimensions` should be a comma-separated list as shown below: `organizations/{org}/environments/{env}/optimizedStats/apiproxy,request_verb`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/optimizedStats/.*$", // "required": true, // "type": "string" + // }, + // "offset": { + // "description": "Offset value. Use `offset` with `limit` to enable pagination of results. For example, to display results 11-20, set limit to `10` and offset to `10`.", + // "location": "query", + // "type": "string" + // }, + // "realtime": { + // "description": "No longer used by Apigee. Supported for backwards compatibility.", + // "location": "query", + // "type": "boolean" + // }, + // "select": { + // "description": "Required. Comma-separated list of metrics. For example: `sum(message_count),sum(error_count)`", + // "location": "query", + // "type": "string" + // }, + // "sonar": { + // "description": "Routes the query to API Monitoring for the last hour.", + // "location": "query", + // "type": "boolean" + // }, + // "sort": { + // "description": "Flag that specifies whether the sort order should be ascending or descending. Valid values include `DESC` and `ASC`.", + // "location": "query", + // "type": "string" + // }, + // "sortby": { + // "description": "Comma-separated list of columns to sort the final result.", + // "location": "query", + // "type": "string" + // }, + // "timeRange": { + // "description": "Required. Time interval for the interactive query. Time range is specified in GMT as `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59`", + // "location": "query", + // "type": "string" + // }, + // "timeUnit": { + // "description": "Granularity of metrics returned. Valid values include: `second`, `minute`, `hour`, `day`, `week`, or `month`.", + // "location": "query", + // "type": "string" + // }, + // "topk": { + // "description": "Top number of results to return. For example, to return the top 5 results, set `topk=5`.", + // "location": "query", + // "type": "string" + // }, + // "tsAscending": { + // "description": "Flag that specifies whether to list timestamps in ascending (`true`) or descending (`false`) order. Apigee recommends setting this value to `true` if you are using `sortby` with `sort=DESC`.", + // "location": "query", + // "type": "boolean" + // }, + // "tzo": { + // "description": "Timezone offset value.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/keystores", - // "request": { - // "$ref": "GoogleCloudApigeeV1Keystore" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Keystore" + // "$ref": "GoogleCloudApigeeV1OptimizedStats" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -34098,31 +37697,35 @@ func (c *OrganizationsEnvironmentsKeystoresCreateCall) Do(opts ...googleapi.Call } -// method id "apigee.organizations.environments.keystores.delete": +// method id "apigee.organizations.environments.queries.create": -type OrganizationsEnvironmentsKeystoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsQueriesCreateCall struct { + s *Service + parent string + googlecloudapigeev1query *GoogleCloudApigeeV1Query + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a keystore or truststore. +// Create: Submit a query to be processed in the background. If the +// submission of the query succeeds, the API returns a 201 status and an +// ID that refer to the query. In addition to the HTTP status 201, the +// `state` of "enqueued" means that the request succeeded. // -// - name: Name of the keystore. Use the following format in your -// request: -// `organizations/{org}/environments/{env}/keystores/{keystore}`. -func (r *OrganizationsEnvironmentsKeystoresService) Delete(name string) *OrganizationsEnvironmentsKeystoresDeleteCall { - c := &OrganizationsEnvironmentsKeystoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name. Must be of the form +// `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsQueriesService) Create(parent string, googlecloudapigeev1query *GoogleCloudApigeeV1Query) *OrganizationsEnvironmentsQueriesCreateCall { + c := &OrganizationsEnvironmentsQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1query = googlecloudapigeev1query return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsKeystoresDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresDeleteCall { +func (c *OrganizationsEnvironmentsQueriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34130,21 +37733,21 @@ func (c *OrganizationsEnvironmentsKeystoresDeleteCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsKeystoresDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresDeleteCall { +func (c *OrganizationsEnvironmentsQueriesCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsQueriesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeystoresDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsQueriesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeystoresDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsQueriesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -34152,29 +37755,34 @@ func (c *OrganizationsEnvironmentsKeystoresDeleteCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1query) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/queries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keystores.delete" call. -// Exactly one of *GoogleCloudApigeeV1Keystore or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1Keystore.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.environments.queries.create" call. +// Exactly one of *GoogleCloudApigeeV1AsyncQuery or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1AsyncQuery.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 *OrganizationsEnvironmentsKeystoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Keystore, error) { +func (c *OrganizationsEnvironmentsQueriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQuery, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34193,7 +37801,7 @@ func (c *OrganizationsEnvironmentsKeystoresDeleteCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Keystore{ + ret := &GoogleCloudApigeeV1AsyncQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34205,25 +37813,28 @@ func (c *OrganizationsEnvironmentsKeystoresDeleteCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Deletes a keystore or truststore.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.keystores.delete", + // "description": "Submit a query to be processed in the background. If the submission of the query succeeds, the API returns a 201 status and an ID that refer to the query. In addition to the HTTP status 201, the `state` of \"enqueued\" means that the request succeeded.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/queries", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.queries.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the keystore. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}`", + // "parent": { + // "description": "Required. The parent resource name. Must be of the form `organizations/{org}/environments/{env}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/queries", + // "request": { + // "$ref": "GoogleCloudApigeeV1Query" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Keystore" + // "$ref": "GoogleCloudApigeeV1AsyncQuery" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -34232,9 +37843,9 @@ func (c *OrganizationsEnvironmentsKeystoresDeleteCall) Do(opts ...googleapi.Call } -// method id "apigee.organizations.environments.keystores.get": +// method id "apigee.organizations.environments.queries.get": -type OrganizationsEnvironmentsKeystoresGetCall struct { +type OrganizationsEnvironmentsQueriesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -34243,13 +37854,14 @@ type OrganizationsEnvironmentsKeystoresGetCall struct { header_ http.Header } -// Get: Gets a keystore or truststore. +// Get: Get query status If the query is still in progress, the `state` +// is set to "running" After the query has completed successfully, +// `state` is set to "completed" // -// - name: Name of the keystore. Use the following format in your -// request: -// `organizations/{org}/environments/{env}/keystores/{keystore}`. -func (r *OrganizationsEnvironmentsKeystoresService) Get(name string) *OrganizationsEnvironmentsKeystoresGetCall { - c := &OrganizationsEnvironmentsKeystoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the asynchronous query to get. Must be of the form +// `organizations/{org}/environments/{env}/queries/{queryId}`. +func (r *OrganizationsEnvironmentsQueriesService) Get(name string) *OrganizationsEnvironmentsQueriesGetCall { + c := &OrganizationsEnvironmentsQueriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -34257,7 +37869,7 @@ func (r *OrganizationsEnvironmentsKeystoresService) Get(name string) *Organizati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsKeystoresGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresGetCall { +func (c *OrganizationsEnvironmentsQueriesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34267,7 +37879,7 @@ func (c *OrganizationsEnvironmentsKeystoresGetCall) Fields(s ...googleapi.Field) // 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 *OrganizationsEnvironmentsKeystoresGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsKeystoresGetCall { +func (c *OrganizationsEnvironmentsQueriesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsQueriesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -34275,21 +37887,21 @@ func (c *OrganizationsEnvironmentsKeystoresGetCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsKeystoresGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresGetCall { +func (c *OrganizationsEnvironmentsQueriesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsQueriesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeystoresGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsQueriesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeystoresGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsQueriesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -34315,14 +37927,14 @@ func (c *OrganizationsEnvironmentsKeystoresGetCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keystores.get" call. -// Exactly one of *GoogleCloudApigeeV1Keystore or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1Keystore.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.environments.queries.get" call. +// Exactly one of *GoogleCloudApigeeV1AsyncQuery or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1AsyncQuery.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 *OrganizationsEnvironmentsKeystoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Keystore, error) { +func (c *OrganizationsEnvironmentsQueriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQuery, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34341,7 +37953,7 @@ func (c *OrganizationsEnvironmentsKeystoresGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Keystore{ + ret := &GoogleCloudApigeeV1AsyncQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34353,25 +37965,25 @@ func (c *OrganizationsEnvironmentsKeystoresGetCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Gets a keystore or truststore.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}", + // "description": "Get query status If the query is still in progress, the `state` is set to \"running\" After the query has completed successfully, `state` is set to \"completed\"", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/queries/{queriesId}", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.keystores.get", + // "id": "apigee.organizations.environments.queries.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the keystore. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}`.", + // "description": "Required. Name of the asynchronous query to get. Must be of the form `organizations/{org}/environments/{env}/queries/{queryId}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/queries/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Keystore" + // "$ref": "GoogleCloudApigeeV1AsyncQuery" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -34380,148 +37992,101 @@ func (c *OrganizationsEnvironmentsKeystoresGetCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.environments.keystores.aliases.create": +// method id "apigee.organizations.environments.queries.getResult": -type OrganizationsEnvironmentsKeystoresAliasesCreateCall struct { - s *Service - parent string - googleapihttpbody *GoogleApiHttpBody - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsQueriesGetResultCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates an alias from a key/certificate pair. The structure -// of the request is controlled by the `format` query parameter: - -// `keycertfile` - Separate PEM-encoded key and certificate files are -// uploaded. Set `Content-Type: multipart/form-data` and include the -// `keyFile`, `certFile`, and `password` (if keys are encrypted) fields -// in the request body. If uploading to a truststore, omit `keyFile`. - -// `pkcs12` - A PKCS12 file is uploaded. Set `Content-Type: -// multipart/form-data`, provide the file in the `file` field, and -// include the `password` field if the file is encrypted in the request -// body. - `selfsignedcert` - A new private key and certificate are -// generated. Set `Content-Type: application/json` and include -// CertificateGenerationSpec in the request body. +// GetResult: After the query is completed, use this API to retrieve the +// results. If the request succeeds, and there is a non-zero result set, +// the result is downloaded to the client as a zipped JSON file. The +// name of the downloaded file will be: OfflineQueryResult-.zip Example: +// `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip` // -// - parent: Name of the keystore. Use the following format in your -// request: -// `organizations/{org}/environments/{env}/keystores/{keystore}`. -func (r *OrganizationsEnvironmentsKeystoresAliasesService) Create(parent string, googleapihttpbody *GoogleApiHttpBody) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { - c := &OrganizationsEnvironmentsKeystoresAliasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleapihttpbody = googleapihttpbody - return c -} - -// Password sets the optional parameter "_password": DEPRECATED: For -// improved security, specify the password in the request body instead -// of using the query parameter. To specify the password in the request -// body, set `Content-type: multipart/form-data` part with name -// `password`. Password for the private key file, if required. -func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Password(Password string) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { - c.urlParams_.Set("_password", Password) - return c -} - -// Alias sets the optional parameter "alias": Alias for the -// key/certificate pair. Values must match the regular expression -// `[\w\s-.]{1,255}`. This must be provided for all formats except -// `selfsignedcert`; self-signed certs may specify the alias in either -// this parameter or the JSON body. -func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Alias(alias string) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { - c.urlParams_.Set("alias", alias) - return c -} - -// Format sets the optional parameter "format": Required. Format of the -// data. Valid values include: `selfsignedcert`, `keycertfile`, or -// `pkcs12` -func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Format(format string) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { - c.urlParams_.Set("format", format) - return c -} - -// IgnoreExpiryValidation sets the optional parameter -// "ignoreExpiryValidation": Flag that specifies whether to ignore -// expiry validation. If set to `true`, no expiry validation will be -// performed. -func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) IgnoreExpiryValidation(ignoreExpiryValidation bool) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { - c.urlParams_.Set("ignoreExpiryValidation", fmt.Sprint(ignoreExpiryValidation)) - return c -} - -// IgnoreNewlineValidation sets the optional parameter -// "ignoreNewlineValidation": Flag that specifies whether to ignore -// newline validation. If set to `true`, no error is thrown when the -// file contains a certificate chain with no newline between each -// certificate. Defaults to `false`. -func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) IgnoreNewlineValidation(ignoreNewlineValidation bool) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { - c.urlParams_.Set("ignoreNewlineValidation", fmt.Sprint(ignoreNewlineValidation)) +// - name: Name of the asynchronous query result to get. Must be of the +// form +// `organizations/{org}/environments/{env}/queries/{queryId}/result`. +func (r *OrganizationsEnvironmentsQueriesService) GetResult(name string) *OrganizationsEnvironmentsQueriesGetResultCall { + c := &OrganizationsEnvironmentsQueriesGetResultCall{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 *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { +func (c *OrganizationsEnvironmentsQueriesGetResultCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesGetResultCall { 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 *OrganizationsEnvironmentsQueriesGetResultCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsQueriesGetResultCall { + 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 *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresAliasesCreateCall { +func (c *OrganizationsEnvironmentsQueriesGetResultCall) Context(ctx context.Context) *OrganizationsEnvironmentsQueriesGetResultCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsQueriesGetResultCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsQueriesGetResultCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googleapihttpbody) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/aliases") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keystores.aliases.create" call. -// Exactly one of *GoogleCloudApigeeV1Alias or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1Alias.ServerResponse.Header or (if a response was +// Do executes the "apigee.organizations.environments.queries.getResult" call. +// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.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 *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Alias, error) { +func (c *OrganizationsEnvironmentsQueriesGetResultCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34540,7 +38105,7 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Alias{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34552,53 +38117,25 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Do(opts ...googlea } return ret, nil // { - // "description": "Creates an alias from a key/certificate pair. The structure of the request is controlled by the `format` query parameter: - `keycertfile` - Separate PEM-encoded key and certificate files are uploaded. Set `Content-Type: multipart/form-data` and include the `keyFile`, `certFile`, and `password` (if keys are encrypted) fields in the request body. If uploading to a truststore, omit `keyFile`. - `pkcs12` - A PKCS12 file is uploaded. Set `Content-Type: multipart/form-data`, provide the file in the `file` field, and include the `password` field if the file is encrypted in the request body. - `selfsignedcert` - A new private key and certificate are generated. Set `Content-Type: application/json` and include CertificateGenerationSpec in the request body.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}/aliases", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.keystores.aliases.create", + // "description": "After the query is completed, use this API to retrieve the results. If the request succeeds, and there is a non-zero result set, the result is downloaded to the client as a zipped JSON file. The name of the downloaded file will be: OfflineQueryResult-.zip Example: `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip`", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/queries/{queriesId}/result", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.queries.getResult", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "_password": { - // "description": "DEPRECATED: For improved security, specify the password in the request body instead of using the query parameter. To specify the password in the request body, set `Content-type: multipart/form-data` part with name `password`. Password for the private key file, if required.", - // "location": "query", - // "type": "string" - // }, - // "alias": { - // "description": "Alias for the key/certificate pair. Values must match the regular expression `[\\w\\s-.]{1,255}`. This must be provided for all formats except `selfsignedcert`; self-signed certs may specify the alias in either this parameter or the JSON body.", - // "location": "query", - // "type": "string" - // }, - // "format": { - // "description": "Required. Format of the data. Valid values include: `selfsignedcert`, `keycertfile`, or `pkcs12`", - // "location": "query", - // "type": "string" - // }, - // "ignoreExpiryValidation": { - // "description": "Flag that specifies whether to ignore expiry validation. If set to `true`, no expiry validation will be performed.", - // "location": "query", - // "type": "boolean" - // }, - // "ignoreNewlineValidation": { - // "description": "Flag that specifies whether to ignore newline validation. If set to `true`, no error is thrown when the file contains a certificate chain with no newline between each certificate. Defaults to `false`.", - // "location": "query", - // "type": "boolean" - // }, - // "parent": { - // "description": "Required. Name of the keystore. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}`.", + // "name": { + // "description": "Required. Name of the asynchronous query result to get. Must be of the form `organizations/{org}/environments/{env}/queries/{queryId}/result`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/queries/[^/]+/result$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/aliases", - // "request": { - // "$ref": "GoogleApiHttpBody" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Alias" + // "$ref": "GoogleApiHttpBody" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -34607,9 +38144,9 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesCreateCall) Do(opts ...googlea } -// method id "apigee.organizations.environments.keystores.aliases.csr": +// method id "apigee.organizations.environments.queries.getResulturl": -type OrganizationsEnvironmentsKeystoresAliasesCsrCall struct { +type OrganizationsEnvironmentsQueriesGetResulturlCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -34618,14 +38155,17 @@ type OrganizationsEnvironmentsKeystoresAliasesCsrCall struct { header_ http.Header } -// Csr: Generates a PKCS #10 Certificate Signing Request for the private -// key in an alias. +// GetResulturl: After the query is completed, use this API to retrieve +// the results. If the request succeeds, and there is a non-zero result +// set, the result is sent to the client as a list of urls to JSON +// files. // -// - name: Name of the alias. Use the following format in your request: -// `organizations/{org}/environments/{env}/keystores/{keystore}/aliases -// /{alias}`. -func (r *OrganizationsEnvironmentsKeystoresAliasesService) Csr(name string) *OrganizationsEnvironmentsKeystoresAliasesCsrCall { - c := &OrganizationsEnvironmentsKeystoresAliasesCsrCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the asynchronous query result to get. Must be of the +// form +// `organizations/{org}/environments/{env}/queries/{queryId}/resulturl` +// . +func (r *OrganizationsEnvironmentsQueriesService) GetResulturl(name string) *OrganizationsEnvironmentsQueriesGetResulturlCall { + c := &OrganizationsEnvironmentsQueriesGetResulturlCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -34633,7 +38173,7 @@ func (r *OrganizationsEnvironmentsKeystoresAliasesService) Csr(name string) *Org // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresAliasesCsrCall { +func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesGetResulturlCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34643,7 +38183,7 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) Fields(s ...googleapi // 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 *OrganizationsEnvironmentsKeystoresAliasesCsrCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsKeystoresAliasesCsrCall { +func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsQueriesGetResulturlCall { c.ifNoneMatch_ = entityTag return c } @@ -34651,21 +38191,21 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresAliasesCsrCall { +func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) Context(ctx context.Context) *OrganizationsEnvironmentsQueriesGetResulturlCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) Header() http.Header { +func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -34678,7 +38218,7 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/csr") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -34691,14 +38231,16 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keystores.aliases.csr" call. -// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.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 *OrganizationsEnvironmentsKeystoresAliasesCsrCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// Do executes the "apigee.organizations.environments.queries.getResulturl" call. +// Exactly one of *GoogleCloudApigeeV1GetAsyncQueryResultUrlResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1GetAsyncQueryResultUrlResponse.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 *OrganizationsEnvironmentsQueriesGetResulturlCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1GetAsyncQueryResultUrlResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34717,7 +38259,7 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleApiHttpBody{ + ret := &GoogleCloudApigeeV1GetAsyncQueryResultUrlResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34729,25 +38271,25 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Generates a PKCS #10 Certificate Signing Request for the private key in an alias.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}/aliases/{aliasesId}/csr", + // "description": "After the query is completed, use this API to retrieve the results. If the request succeeds, and there is a non-zero result set, the result is sent to the client as a list of urls to JSON files.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/queries/{queriesId}/resulturl", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.keystores.aliases.csr", + // "id": "apigee.organizations.environments.queries.getResulturl", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the alias. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}/aliases/{alias}`.", + // "description": "Required. Name of the asynchronous query result to get. Must be of the form `organizations/{org}/environments/{env}/queries/{queryId}/resulturl`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+/aliases/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/queries/[^/]+/resulturl$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}/csr", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleApiHttpBody" + // "$ref": "GoogleCloudApigeeV1GetAsyncQueryResultUrlResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -34756,83 +38298,143 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesCsrCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.keystores.aliases.delete": +// method id "apigee.organizations.environments.queries.list": -type OrganizationsEnvironmentsKeystoresAliasesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsQueriesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an alias. +// List: Return a list of Asynchronous Queries // -// - name: Name of the alias. Use the following format in your request: -// `organizations/{org}/environments/{env}/keystores/{keystore}/aliases -// /{alias}`. -func (r *OrganizationsEnvironmentsKeystoresAliasesService) Delete(name string) *OrganizationsEnvironmentsKeystoresAliasesDeleteCall { - c := &OrganizationsEnvironmentsKeystoresAliasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name. Must be of the form +// `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsQueriesService) List(parent string) *OrganizationsEnvironmentsQueriesListCall { + c := &OrganizationsEnvironmentsQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Dataset sets the optional parameter "dataset": Filter response list +// by dataset. Example: `api`, `mint` +func (c *OrganizationsEnvironmentsQueriesListCall) Dataset(dataset string) *OrganizationsEnvironmentsQueriesListCall { + c.urlParams_.Set("dataset", dataset) + return c +} + +// From sets the optional parameter "from": Filter response list by +// returning asynchronous queries that created after this date time. +// Time must be in ISO date-time format like '2011-12-03T10:15:30Z'. +func (c *OrganizationsEnvironmentsQueriesListCall) From(from string) *OrganizationsEnvironmentsQueriesListCall { + c.urlParams_.Set("from", from) + return c +} + +// InclQueriesWithoutReport sets the optional parameter +// "inclQueriesWithoutReport": Flag to include asynchronous queries that +// don't have a report denifition. +func (c *OrganizationsEnvironmentsQueriesListCall) InclQueriesWithoutReport(inclQueriesWithoutReport string) *OrganizationsEnvironmentsQueriesListCall { + c.urlParams_.Set("inclQueriesWithoutReport", inclQueriesWithoutReport) + return c +} + +// Status sets the optional parameter "status": Filter response list by +// asynchronous query status. +func (c *OrganizationsEnvironmentsQueriesListCall) Status(status string) *OrganizationsEnvironmentsQueriesListCall { + c.urlParams_.Set("status", status) + return c +} + +// SubmittedBy sets the optional parameter "submittedBy": Filter +// response list by user who submitted queries. +func (c *OrganizationsEnvironmentsQueriesListCall) SubmittedBy(submittedBy string) *OrganizationsEnvironmentsQueriesListCall { + c.urlParams_.Set("submittedBy", submittedBy) + return c +} + +// To sets the optional parameter "to": Filter response list by +// returning asynchronous queries that created before this date time. +// Time must be in ISO date-time format like '2011-12-03T10:16:30Z'. +func (c *OrganizationsEnvironmentsQueriesListCall) To(to string) *OrganizationsEnvironmentsQueriesListCall { + c.urlParams_.Set("to", to) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsKeystoresAliasesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresAliasesDeleteCall { +func (c *OrganizationsEnvironmentsQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesListCall { 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 *OrganizationsEnvironmentsQueriesListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsQueriesListCall { + 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 *OrganizationsEnvironmentsKeystoresAliasesDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresAliasesDeleteCall { +func (c *OrganizationsEnvironmentsQueriesListCall) Context(ctx context.Context) *OrganizationsEnvironmentsQueriesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeystoresAliasesDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsQueriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeystoresAliasesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsQueriesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/queries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keystores.aliases.delete" call. -// Exactly one of *GoogleCloudApigeeV1Alias or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1Alias.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 *OrganizationsEnvironmentsKeystoresAliasesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Alias, error) { +// Do executes the "apigee.organizations.environments.queries.list" call. +// Exactly one of *GoogleCloudApigeeV1ListAsyncQueriesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListAsyncQueriesResponse.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 *OrganizationsEnvironmentsQueriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListAsyncQueriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34851,7 +38453,7 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesDeleteCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Alias{ + ret := &GoogleCloudApigeeV1ListAsyncQueriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34863,25 +38465,55 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesDeleteCall) Do(opts ...googlea } return ret, nil // { - // "description": "Deletes an alias.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}/aliases/{aliasesId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.keystores.aliases.delete", + // "description": "Return a list of Asynchronous Queries", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/queries", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.queries.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the alias. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}/aliases/{alias}`.", + // "dataset": { + // "description": "Filter response list by dataset. Example: `api`, `mint`", + // "location": "query", + // "type": "string" + // }, + // "from": { + // "description": "Filter response list by returning asynchronous queries that created after this date time. Time must be in ISO date-time format like '2011-12-03T10:15:30Z'.", + // "location": "query", + // "type": "string" + // }, + // "inclQueriesWithoutReport": { + // "description": "Flag to include asynchronous queries that don't have a report denifition.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name. Must be of the form `organizations/{org}/environments/{env}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+/aliases/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" + // }, + // "status": { + // "description": "Filter response list by asynchronous query status.", + // "location": "query", + // "type": "string" + // }, + // "submittedBy": { + // "description": "Filter response list by user who submitted queries.", + // "location": "query", + // "type": "string" + // }, + // "to": { + // "description": "Filter response list by returning asynchronous queries that created before this date time. Time must be in ISO date-time format like '2011-12-03T10:16:30Z'.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/queries", // "response": { - // "$ref": "GoogleCloudApigeeV1Alias" + // "$ref": "GoogleCloudApigeeV1ListAsyncQueriesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -34890,97 +38522,90 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesDeleteCall) Do(opts ...googlea } -// method id "apigee.organizations.environments.keystores.aliases.get": +// method id "apigee.organizations.environments.references.create": -type OrganizationsEnvironmentsKeystoresAliasesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsReferencesCreateCall struct { + s *Service + parent string + googlecloudapigeev1reference *GoogleCloudApigeeV1Reference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets an alias. +// Create: Creates a Reference in the specified environment. // -// - name: Name of the alias. Use the following format in your request: -// `organizations/{org}/environments/{env}/keystores/{keystore}/aliases -// /{alias}`. -func (r *OrganizationsEnvironmentsKeystoresAliasesService) Get(name string) *OrganizationsEnvironmentsKeystoresAliasesGetCall { - c := &OrganizationsEnvironmentsKeystoresAliasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent environment name under which the Reference will +// be created. Must be of the form +// `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsReferencesService) Create(parent string, googlecloudapigeev1reference *GoogleCloudApigeeV1Reference) *OrganizationsEnvironmentsReferencesCreateCall { + c := &OrganizationsEnvironmentsReferencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1reference = googlecloudapigeev1reference return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsKeystoresAliasesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresAliasesGetCall { +func (c *OrganizationsEnvironmentsReferencesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsReferencesCreateCall { 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 *OrganizationsEnvironmentsKeystoresAliasesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsKeystoresAliasesGetCall { - 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 *OrganizationsEnvironmentsKeystoresAliasesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresAliasesGetCall { +func (c *OrganizationsEnvironmentsReferencesCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsReferencesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeystoresAliasesGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsReferencesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeystoresAliasesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsReferencesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1reference) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/references") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keystores.aliases.get" call. -// Exactly one of *GoogleCloudApigeeV1Alias or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1Alias.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.environments.references.create" call. +// Exactly one of *GoogleCloudApigeeV1Reference or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Reference.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 *OrganizationsEnvironmentsKeystoresAliasesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Alias, error) { +func (c *OrganizationsEnvironmentsReferencesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Reference, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34999,7 +38624,7 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Alias{ + ret := &GoogleCloudApigeeV1Reference{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35011,25 +38636,28 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesGetCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Gets an alias.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}/aliases/{aliasesId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.keystores.aliases.get", + // "description": "Creates a Reference in the specified environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/references", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.references.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the alias. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}/aliases/{alias}`.", + // "parent": { + // "description": "Required. The parent environment name under which the Reference will be created. Must be of the form `organizations/{org}/environments/{env}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+/aliases/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/references", + // "request": { + // "$ref": "GoogleCloudApigeeV1Reference" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Alias" + // "$ref": "GoogleCloudApigeeV1Reference" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35038,25 +38666,23 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesGetCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.keystores.aliases.getCertificate": +// method id "apigee.organizations.environments.references.delete": -type OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsReferencesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetCertificate: Gets the certificate from an alias in PEM-encoded -// form. +// Delete: Deletes a Reference from an environment. Returns the deleted +// Reference resource. // -// - name: Name of the alias. Use the following format in your request: -// `organizations/{org}/environments/{env}/keystores/{keystore}/aliases -// /{alias}`. -func (r *OrganizationsEnvironmentsKeystoresAliasesService) GetCertificate(name string) *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall { - c := &OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Reference to delete. Must be of the form +// `organizations/{org}/environments/{env}/references/{ref}`. +func (r *OrganizationsEnvironmentsReferencesService) Delete(name string) *OrganizationsEnvironmentsReferencesDeleteCall { + c := &OrganizationsEnvironmentsReferencesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -35064,54 +38690,41 @@ func (r *OrganizationsEnvironmentsKeystoresAliasesService) GetCertificate(name s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall { +func (c *OrganizationsEnvironmentsReferencesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsReferencesDeleteCall { 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 *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall { - 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 *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall { +func (c *OrganizationsEnvironmentsReferencesDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsReferencesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsReferencesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsReferencesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}/certificate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -35122,14 +38735,14 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keystores.aliases.getCertificate" call. -// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.environments.references.delete" call. +// Exactly one of *GoogleCloudApigeeV1Reference or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Reference.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 *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +func (c *OrganizationsEnvironmentsReferencesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Reference, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35148,7 +38761,7 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleApiHttpBody{ + ret := &GoogleCloudApigeeV1Reference{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35160,25 +38773,25 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) Do(opts .. } return ret, nil // { - // "description": "Gets the certificate from an alias in PEM-encoded form.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}/aliases/{aliasesId}/certificate", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.keystores.aliases.getCertificate", + // "description": "Deletes a Reference from an environment. Returns the deleted Reference resource.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/references/{referencesId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.environments.references.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the alias. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}/aliases/{alias}`.", + // "description": "Required. The name of the Reference to delete. Must be of the form `organizations/{org}/environments/{env}/references/{ref}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+/aliases/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/references/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}/certificate", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleApiHttpBody" + // "$ref": "GoogleCloudApigeeV1Reference" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35187,91 +38800,78 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesGetCertificateCall) Do(opts .. } -// method id "apigee.organizations.environments.keystores.aliases.update": +// method id "apigee.organizations.environments.references.get": -type OrganizationsEnvironmentsKeystoresAliasesUpdateCall struct { - s *Service - name string - googleapihttpbody *GoogleApiHttpBody - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsReferencesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates the certificate in an alias. +// Get: Gets a Reference resource. // -// - name: Name of the alias. Use the following format in your request: -// `organizations/{org}/environments/{env}/keystores/{keystore}/aliases -// /{alias}`. -func (r *OrganizationsEnvironmentsKeystoresAliasesService) Update(name string, googleapihttpbody *GoogleApiHttpBody) *OrganizationsEnvironmentsKeystoresAliasesUpdateCall { - c := &OrganizationsEnvironmentsKeystoresAliasesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Reference to get. Must be of the form +// `organizations/{org}/environments/{env}/references/{ref}`. +func (r *OrganizationsEnvironmentsReferencesService) Get(name string) *OrganizationsEnvironmentsReferencesGetCall { + c := &OrganizationsEnvironmentsReferencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleapihttpbody = googleapihttpbody - return c -} - -// IgnoreExpiryValidation sets the optional parameter -// "ignoreExpiryValidation": Required. Flag that specifies whether to -// ignore expiry validation. If set to `true`, no expiry validation will -// be performed. -func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) IgnoreExpiryValidation(ignoreExpiryValidation bool) *OrganizationsEnvironmentsKeystoresAliasesUpdateCall { - c.urlParams_.Set("ignoreExpiryValidation", fmt.Sprint(ignoreExpiryValidation)) - return c -} - -// IgnoreNewlineValidation sets the optional parameter -// "ignoreNewlineValidation": Flag that specifies whether to ignore -// newline validation. If set to `true`, no error is thrown when the -// file contains a certificate chain with no newline between each -// certificate. Defaults to `false`. -func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) IgnoreNewlineValidation(ignoreNewlineValidation bool) *OrganizationsEnvironmentsKeystoresAliasesUpdateCall { - c.urlParams_.Set("ignoreNewlineValidation", fmt.Sprint(ignoreNewlineValidation)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeystoresAliasesUpdateCall { +func (c *OrganizationsEnvironmentsReferencesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsReferencesGetCall { 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 *OrganizationsEnvironmentsReferencesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsReferencesGetCall { + 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 *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeystoresAliasesUpdateCall { +func (c *OrganizationsEnvironmentsReferencesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsReferencesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsReferencesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsReferencesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googleapihttpbody) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -35282,14 +38882,14 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keystores.aliases.update" call. -// Exactly one of *GoogleCloudApigeeV1Alias or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1Alias.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.environments.references.get" call. +// Exactly one of *GoogleCloudApigeeV1Reference or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Reference.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 *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Alias, error) { +func (c *OrganizationsEnvironmentsReferencesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Reference, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35308,7 +38908,7 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Alias{ + ret := &GoogleCloudApigeeV1Reference{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35320,38 +38920,25 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) Do(opts ...googlea } return ret, nil // { - // "description": "Updates the certificate in an alias.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keystores/{keystoresId}/aliases/{aliasesId}", - // "httpMethod": "PUT", - // "id": "apigee.organizations.environments.keystores.aliases.update", + // "description": "Gets a Reference resource.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/references/{referencesId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.references.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "ignoreExpiryValidation": { - // "description": "Required. Flag that specifies whether to ignore expiry validation. If set to `true`, no expiry validation will be performed.", - // "location": "query", - // "type": "boolean" - // }, - // "ignoreNewlineValidation": { - // "description": "Flag that specifies whether to ignore newline validation. If set to `true`, no error is thrown when the file contains a certificate chain with no newline between each certificate. Defaults to `false`.", - // "location": "query", - // "type": "boolean" - // }, // "name": { - // "description": "Required. Name of the alias. Use the following format in your request: `organizations/{org}/environments/{env}/keystores/{keystore}/aliases/{alias}`", + // "description": "Required. The name of the Reference to get. Must be of the form `organizations/{org}/environments/{env}/references/{ref}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/keystores/[^/]+/aliases/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/references/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleApiHttpBody" - // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Alias" + // "$ref": "GoogleCloudApigeeV1Reference" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35360,33 +38947,34 @@ func (c *OrganizationsEnvironmentsKeystoresAliasesUpdateCall) Do(opts ...googlea } -// method id "apigee.organizations.environments.keyvaluemaps.create": +// method id "apigee.organizations.environments.references.update": -type OrganizationsEnvironmentsKeyvaluemapsCreateCall struct { - s *Service - parent string - googlecloudapigeev1keyvaluemap *GoogleCloudApigeeV1KeyValueMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsReferencesUpdateCall struct { + s *Service + name string + googlecloudapigeev1reference *GoogleCloudApigeeV1Reference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a key value map in an environment. +// Update: Updates an existing Reference. Note that this operation has +// PUT semantics; it will replace the entirety of the existing Reference +// with the resource in the request body. // -// - parent: Name of the environment in which to create the key value -// map. Use the following structure in your request: -// `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsKeyvaluemapsService) Create(parent string, googlecloudapigeev1keyvaluemap *GoogleCloudApigeeV1KeyValueMap) *OrganizationsEnvironmentsKeyvaluemapsCreateCall { - c := &OrganizationsEnvironmentsKeyvaluemapsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1keyvaluemap = googlecloudapigeev1keyvaluemap +// - name: The name of the Reference to update. Must be of the form +// `organizations/{org}/environments/{env}/references/{ref}`. +func (r *OrganizationsEnvironmentsReferencesService) Update(name string, googlecloudapigeev1reference *GoogleCloudApigeeV1Reference) *OrganizationsEnvironmentsReferencesUpdateCall { + c := &OrganizationsEnvironmentsReferencesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1reference = googlecloudapigeev1reference return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsKeyvaluemapsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsCreateCall { +func (c *OrganizationsEnvironmentsReferencesUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsReferencesUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35394,21 +38982,21 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsCreateCall) Fields(s ...googleapi. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsKeyvaluemapsCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeyvaluemapsCreateCall { +func (c *OrganizationsEnvironmentsReferencesUpdateCall) Context(ctx context.Context) *OrganizationsEnvironmentsReferencesUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeyvaluemapsCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsReferencesUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeyvaluemapsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsReferencesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -35416,34 +39004,34 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsCreateCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1keyvaluemap) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1reference) 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, "v1/{+parent}/keyvaluemaps") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keyvaluemaps.create" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueMap or error will be +// Do executes the "apigee.organizations.environments.references.update" call. +// Exactly one of *GoogleCloudApigeeV1Reference or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueMap.ServerResponse.Header or (if a +// either *GoogleCloudApigeeV1Reference.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 *OrganizationsEnvironmentsKeyvaluemapsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueMap, error) { +func (c *OrganizationsEnvironmentsReferencesUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Reference, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35462,7 +39050,7 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsCreateCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueMap{ + ret := &GoogleCloudApigeeV1Reference{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35474,28 +39062,28 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsCreateCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Creates a key value map in an environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.keyvaluemaps.create", + // "description": "Updates an existing Reference. Note that this operation has PUT semantics; it will replace the entirety of the existing Reference with the resource in the request body.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/references/{referencesId}", + // "httpMethod": "PUT", + // "id": "apigee.organizations.environments.references.update", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name of the environment in which to create the key value map. Use the following structure in your request: `organizations/{org}/environments/{env}`", + // "name": { + // "description": "Required. The name of the Reference to update. Must be of the form `organizations/{org}/environments/{env}/references/{ref}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/references/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/keyvaluemaps", + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudApigeeV1KeyValueMap" + // "$ref": "GoogleCloudApigeeV1Reference" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueMap" + // "$ref": "GoogleCloudApigeeV1Reference" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35504,31 +39092,51 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsCreateCall) Do(opts ...googleapi.C } -// method id "apigee.organizations.environments.keyvaluemaps.delete": +// method id "apigee.organizations.environments.resourcefiles.create": -type OrganizationsEnvironmentsKeyvaluemapsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsResourcefilesCreateCall struct { + s *Service + parent string + googleapihttpbody *GoogleApiHttpBody + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a key value map from an environment. +// Create: Creates a resource file. Specify the `Content-Type` as +// `application/octet-stream` or `multipart/form-data`. For more +// information about resource files, see Resource files +// (https://cloud.google.com/apigee/docs/api-platform/develop/resource-files). // -// - name: Name of the key value map. Use the following structure in -// your request: -// `organizations/{org}/environments/{env}/keyvaluemaps/{keyvaluemap}`. -func (r *OrganizationsEnvironmentsKeyvaluemapsService) Delete(name string) *OrganizationsEnvironmentsKeyvaluemapsDeleteCall { - c := &OrganizationsEnvironmentsKeyvaluemapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the environment in which to create the resource +// file in the following format: +// `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsResourcefilesService) Create(parent string, googleapihttpbody *GoogleApiHttpBody) *OrganizationsEnvironmentsResourcefilesCreateCall { + c := &OrganizationsEnvironmentsResourcefilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleapihttpbody = googleapihttpbody + return c +} + +// Name sets the optional parameter "name": Required. Name of the +// resource file. Must match the regular expression: +// [a-zA-Z0-9:/\\!@#$%^&{}\\ ()+\-=,.~'` ]{1,255} +func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Name(name string) *OrganizationsEnvironmentsResourcefilesCreateCall { + c.urlParams_.Set("name", name) + return c +} + +// Type sets the optional parameter "type": Required. Resource file +// type. {{ resource_file_type }} +func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Type(type_ string) *OrganizationsEnvironmentsResourcefilesCreateCall { + 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 *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsDeleteCall { +func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35536,21 +39144,21 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) Fields(s ...googleapi. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeyvaluemapsDeleteCall { +func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsResourcefilesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -35558,29 +39166,34 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/resourcefiles") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keyvaluemaps.delete" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueMap or error will be +// Do executes the "apigee.organizations.environments.resourcefiles.create" call. +// Exactly one of *GoogleCloudApigeeV1ResourceFile or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueMap.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 +// either *GoogleCloudApigeeV1ResourceFile.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 *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueMap, error) { +func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ResourceFile, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35599,7 +39212,7 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueMap{ + ret := &GoogleCloudApigeeV1ResourceFile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35611,25 +39224,38 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Deletes a key value map from an environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps/{keyvaluemapsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.keyvaluemaps.delete", + // "description": "Creates a resource file. Specify the `Content-Type` as `application/octet-stream` or `multipart/form-data`. For more information about resource files, see [Resource files](https://cloud.google.com/apigee/docs/api-platform/develop/resource-files).", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/resourcefiles", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.resourcefiles.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "name": { - // "description": "Required. Name of the key value map. Use the following structure in your request: `organizations/{org}/environments/{env}/keyvaluemaps/{keyvaluemap}`", + // "description": "Required. Name of the resource file. Must match the regular expression: [a-zA-Z0-9:/\\\\!@#$%^\u0026{}\\[\\]()+\\-=,.~'` ]{1,255}", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of the environment in which to create the resource file in the following format: `organizations/{org}/environments/{env}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" + // }, + // "type": { + // "description": "Required. Resource file type. {{ resource_file_type }}", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/resourcefiles", + // "request": { + // "$ref": "GoogleApiHttpBody" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueMap" + // "$ref": "GoogleCloudApigeeV1ResourceFile" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35638,39 +39264,39 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) Do(opts ...googleapi.C } -// method id "apigee.organizations.environments.keyvaluemaps.entries.create": +// method id "apigee.organizations.environments.resourcefiles.delete": -type OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall struct { - s *Service - parent string - googlecloudapigeev1keyvalueentry *GoogleCloudApigeeV1KeyValueEntry - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsResourcefilesDeleteCall struct { + s *Service + parent string + type_ string + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates key value entries in a key value map scoped to an -// organization, environment, or API proxy. +// Delete: Deletes a resource file. For more information about resource +// files, see Resource files +// (https://cloud.google.com/apigee/docs/api-platform/develop/resource-files). // -// - parent: Scope as indicated by the URI in which to create the key -// value map entry. Use **one** of the following structures in your -// request: * -// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}` -// . * -// `organizations/{organization}/environments/{environment}/keyvaluemap -// s/{keyvaluemap}` * -// `organizations/{organization}/keyvaluemaps/{keyvaluemap}`. -func (r *OrganizationsEnvironmentsKeyvaluemapsEntriesService) Create(parent string, googlecloudapigeev1keyvalueentry *GoogleCloudApigeeV1KeyValueEntry) *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall { - c := &OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: ID of the resource file to delete. Must match the regular +// expression: [a-zA-Z0-9:/\\!@#$%^&{}\\ ()+\-=,.~'` ]{1,255}. +// - parent: Name of the environment in the following format: +// `organizations/{org}/environments/{env}`. +// - type: Resource file type. {{ resource_file_type }}. +func (r *OrganizationsEnvironmentsResourcefilesService) Delete(parent string, type_ string, name string) *OrganizationsEnvironmentsResourcefilesDeleteCall { + c := &OrganizationsEnvironmentsResourcefilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1keyvalueentry = googlecloudapigeev1keyvalueentry + c.type_ = type_ + 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 *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall { +func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35678,21 +39304,21 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) Fields(s ...goo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall { +func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -35700,34 +39326,31 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) doRequest(alt s } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1keyvalueentry) - 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, "v1/{+parent}/entries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/resourcefiles/{type}/{name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, + "type": c.type_, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keyvaluemaps.entries.create" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be +// Do executes the "apigee.organizations.environments.resourcefiles.delete" call. +// Exactly one of *GoogleCloudApigeeV1ResourceFile or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueEntry.ServerResponse.Header or (if +// either *GoogleCloudApigeeV1ResourceFile.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 *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { +func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ResourceFile, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35746,7 +39369,7 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueEntry{ + ret := &GoogleCloudApigeeV1ResourceFile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35758,28 +39381,39 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) Do(opts ...goog } return ret, nil // { - // "description": "Creates key value entries in a key value map scoped to an organization, environment, or API proxy.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps/{keyvaluemapsId}/entries", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.keyvaluemaps.entries.create", + // "description": "Deletes a resource file. For more information about resource files, see [Resource files](https://cloud.google.com/apigee/docs/api-platform/develop/resource-files).", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/resourcefiles/{type}/{name}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.environments.resourcefiles.delete", // "parameterOrder": [ - // "parent" + // "parent", + // "type", + // "name" // ], // "parameters": { + // "name": { + // "description": "Required. ID of the resource file to delete. Must match the regular expression: [a-zA-Z0-9:/\\\\!@#$%^\u0026{}\\[\\]()+\\-=,.~'` ]{1,255}", + // "location": "path", + // "required": true, + // "type": "string" + // }, // "parent": { - // "description": "Required. Scope as indicated by the URI in which to create the key value map entry. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", + // "description": "Required. Name of the environment in the following format: `organizations/{org}/environments/{env}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "type": { + // "description": "Required. Resource file type. {{ resource_file_type }}", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/entries", - // "request": { - // "$ref": "GoogleCloudApigeeV1KeyValueEntry" - // }, + // "path": "v1/{+parent}/resourcefiles/{type}/{name}", // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueEntry" + // "$ref": "GoogleCloudApigeeV1ResourceFile" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35788,33 +39422,32 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) Do(opts ...goog } -// method id "apigee.organizations.environments.keyvaluemaps.entries.delete": +// method id "apigee.organizations.environments.resourcefiles.get": -type OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsResourcefilesGetCall struct { + s *Service + parent string + type_ string + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a key value entry from a key value map scoped to an -// organization, environment, or API proxy. **Note:** After you delete -// the key value entry, the policy consuming the entry will continue to -// function with its cached values for a few minutes. This is expected -// behavior. +// Get: Gets the contents of a resource file. For more information about +// resource files, see Resource files +// (https://cloud.google.com/apigee/docs/api-platform/develop/resource-files). // -// - name: Scope as indicated by the URI in which to delete the key -// value map entry. Use **one** of the following structures in your -// request: * -// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/ -// entries/{entry}`. * -// `organizations/{organization}/environments/{environment}/keyvaluemap -// s/{keyvaluemap}/entries/{entry}` * -// `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{en -// try}`. -func (r *OrganizationsEnvironmentsKeyvaluemapsEntriesService) Delete(name string) *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall { - c := &OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: ID of the resource file. Must match the regular expression: +// [a-zA-Z0-9:/\\!@#$%^&{}\\ ()+\-=,.~'` ]{1,255}. +// - parent: Name of the environment in the following format: +// `organizations/{org}/environments/{env}`. +// - type: Resource file type. {{ resource_file_type }}. +func (r *OrganizationsEnvironmentsResourcefilesService) Get(parent string, type_ string, name string) *OrganizationsEnvironmentsResourcefilesGetCall { + c := &OrganizationsEnvironmentsResourcefilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.type_ = type_ c.name = name return c } @@ -35822,59 +39455,74 @@ func (r *OrganizationsEnvironmentsKeyvaluemapsEntriesService) Delete(name string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall { +func (c *OrganizationsEnvironmentsResourcefilesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesGetCall { 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 *OrganizationsEnvironmentsResourcefilesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsResourcefilesGetCall { + 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 *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall { +func (c *OrganizationsEnvironmentsResourcefilesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsResourcefilesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsResourcefilesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/resourcefiles/{type}/{name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, + "type": c.type_, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keyvaluemaps.entries.delete" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueEntry.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 +// Do executes the "apigee.organizations.environments.resourcefiles.get" call. +// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.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 *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { +func (c *OrganizationsEnvironmentsResourcefilesGetCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35893,7 +39541,7 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueEntry{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35905,25 +39553,39 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) Do(opts ...goog } return ret, nil // { - // "description": "Deletes a key value entry from a key value map scoped to an organization, environment, or API proxy. **Note:** After you delete the key value entry, the policy consuming the entry will continue to function with its cached values for a few minutes. This is expected behavior.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.keyvaluemaps.entries.delete", + // "description": "Gets the contents of a resource file. For more information about resource files, see [Resource files](https://cloud.google.com/apigee/docs/api-platform/develop/resource-files).", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/resourcefiles/{type}/{name}", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.resourcefiles.get", // "parameterOrder": [ + // "parent", + // "type", // "name" // ], // "parameters": { // "name": { - // "description": "Required. Scope as indicated by the URI in which to delete the key value map entry. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/entries/{entry}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}/entries/{entry}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{entry}`.", + // "description": "Required. ID of the resource file. Must match the regular expression: [a-zA-Z0-9:/\\\\!@#$%^\u0026{}\\[\\]()+\\-=,.~'` ]{1,255}", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of the environment in the following format: `organizations/{org}/environments/{env}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "type": { + // "description": "Required. Resource file type. {{ resource_file_type }}", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/resourcefiles/{type}/{name}", // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueEntry" + // "$ref": "GoogleApiHttpBody" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35932,39 +39594,40 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) Do(opts ...goog } -// method id "apigee.organizations.environments.keyvaluemaps.entries.get": +// method id "apigee.organizations.environments.resourcefiles.list": -type OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall struct { +type OrganizationsEnvironmentsResourcefilesListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Get the Key value entry value for org, env or apis scoped Key -// value map. +// List: Lists all resource files, optionally filtering by type. For +// more information about resource files, see Resource files +// (https://cloud.google.com/apigee/docs/api-platform/develop/resource-files). // -// - name: Scope as indicated by the URI in which to fetch the key value -// map entry/value. Use **one** of the following structures in your -// request: * -// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/ -// entries/{entry}`. * -// `organizations/{organization}/environments/{environment}/keyvaluemap -// s/{keyvaluemap}/entries/{entry}` * -// `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{en -// try}`. -func (r *OrganizationsEnvironmentsKeyvaluemapsEntriesService) Get(name string) *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall { - c := &OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the environment in which to list resource files in +// the following format: `organizations/{org}/environments/{env}`. +func (r *OrganizationsEnvironmentsResourcefilesService) List(parent string) *OrganizationsEnvironmentsResourcefilesListCall { + c := &OrganizationsEnvironmentsResourcefilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Type sets the optional parameter "type": Type of resource files to +// list. {{ resource_file_type }} +func (c *OrganizationsEnvironmentsResourcefilesListCall) Type(type_ string) *OrganizationsEnvironmentsResourcefilesListCall { + 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 *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall { +func (c *OrganizationsEnvironmentsResourcefilesListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35974,7 +39637,7 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) Fields(s ...google // 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 *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall { +func (c *OrganizationsEnvironmentsResourcefilesListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsResourcefilesListCall { c.ifNoneMatch_ = entityTag return c } @@ -35982,21 +39645,21 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) IfNoneMatch(entity // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall { +func (c *OrganizationsEnvironmentsResourcefilesListCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsResourcefilesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsResourcefilesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -36009,7 +39672,7 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) doRequest(alt stri var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/resourcefiles") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -36017,19 +39680,21 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keyvaluemaps.entries.get" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueEntry.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 *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { +// Do executes the "apigee.organizations.environments.resourcefiles.list" call. +// Exactly one of *GoogleCloudApigeeV1ListEnvironmentResourcesResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudApigeeV1ListEnvironmentResourcesResponse.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 *OrganizationsEnvironmentsResourcefilesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListEnvironmentResourcesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36048,7 +39713,7 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueEntry{ + ret := &GoogleCloudApigeeV1ListEnvironmentResourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36059,26 +39724,31 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) Do(opts ...googlea return nil, err } return ret, nil - // { - // "description": "Get the Key value entry value for org, env or apis scoped Key value map.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", + // { + // "description": "Lists all resource files, optionally filtering by type. For more information about resource files, see [Resource files](https://cloud.google.com/apigee/docs/api-platform/develop/resource-files).", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/resourcefiles", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.keyvaluemaps.entries.get", + // "id": "apigee.organizations.environments.resourcefiles.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Scope as indicated by the URI in which to fetch the key value map entry/value. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/entries/{entry}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}/entries/{entry}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{entry}`.", + // "parent": { + // "description": "Required. Name of the environment in which to list resource files in the following format: `organizations/{org}/environments/{env}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" + // }, + // "type": { + // "description": "Optional. Type of resource files to list. {{ resource_file_type }}", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/resourcefiles", // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueEntry" + // "$ref": "GoogleCloudApigeeV1ListEnvironmentResourcesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36087,53 +39757,38 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) Do(opts ...googlea } -// method id "apigee.organizations.environments.keyvaluemaps.entries.list": +// method id "apigee.organizations.environments.resourcefiles.listEnvironmentResources": -type OrganizationsEnvironmentsKeyvaluemapsEntriesListCall struct { +type OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall struct { s *Service parent string + type_ string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists key value entries for key values maps scoped to an -// organization, environment, or API proxy. +// ListEnvironmentResources: Lists all resource files, optionally +// filtering by type. For more information about resource files, see +// Resource files +// (https://cloud.google.com/apigee/docs/api-platform/develop/resource-files). // -// - parent: Scope as indicated by the URI in which to list key value -// maps. Use **one** of the following structures in your request: * -// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}` -// . * -// `organizations/{organization}/environments/{environment}/keyvaluemap -// s/{keyvaluemap}` * -// `organizations/{organization}/keyvaluemaps/{keyvaluemap}`. -func (r *OrganizationsEnvironmentsKeyvaluemapsEntriesService) List(parent string) *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall { - c := &OrganizationsEnvironmentsKeyvaluemapsEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the environment in which to list resource files in +// the following format: `organizations/{org}/environments/{env}`. +// - type: Optional. Type of resource files to list. {{ +// resource_file_type }}. +func (r *OrganizationsEnvironmentsResourcefilesService) ListEnvironmentResources(parent string, type_ string) *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall { + c := &OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// key value entries to return. If unspecified, at most 100 entries will -// be returned. -func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) PageSize(pageSize int64) *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token. If -// provides, must be a valid key value entry returned from a previous -// call that can be used to retrieve the next page. -func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) PageToken(pageToken string) *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall { - c.urlParams_.Set("pageToken", pageToken) + c.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 *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall { +func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36143,7 +39798,7 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Fields(s ...googl // 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 *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall { +func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall { c.ifNoneMatch_ = entityTag return c } @@ -36151,21 +39806,21 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) IfNoneMatch(entit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Context(ctx context.Context) *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall { +func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -36178,7 +39833,7 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) doRequest(alt str var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/resourcefiles/{type}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -36187,20 +39842,21 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) doRequest(alt str req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, + "type": c.type_, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.keyvaluemaps.entries.list" call. -// Exactly one of *GoogleCloudApigeeV1ListKeyValueEntriesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListKeyValueEntriesResponse.ServerResponse.Header -// or (if a response was returned at all) in +// Do executes the "apigee.organizations.environments.resourcefiles.listEnvironmentResources" call. +// Exactly one of *GoogleCloudApigeeV1ListEnvironmentResourcesResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudApigeeV1ListEnvironmentResourcesResponse.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 *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListKeyValueEntriesResponse, error) { +func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListEnvironmentResourcesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36219,7 +39875,7 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListKeyValueEntriesResponse{ + ret := &GoogleCloudApigeeV1ListEnvironmentResourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36231,36 +39887,32 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Do(opts ...google } return ret, nil // { - // "description": "Lists key value entries for key values maps scoped to an organization, environment, or API proxy.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps/{keyvaluemapsId}/entries", + // "description": "Lists all resource files, optionally filtering by type. For more information about resource files, see [Resource files](https://cloud.google.com/apigee/docs/api-platform/develop/resource-files).", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/resourcefiles/{type}", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.keyvaluemaps.entries.list", + // "id": "apigee.organizations.environments.resourcefiles.listEnvironmentResources", // "parameterOrder": [ - // "parent" + // "parent", + // "type" // ], // "parameters": { - // "pageSize": { - // "description": "Optional. Maximum number of key value entries to return. If unspecified, at most 100 entries will be returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Page token. If provides, must be a valid key value entry returned from a previous call that can be used to retrieve the next page.", - // "location": "query", + // "parent": { + // "description": "Required. Name of the environment in which to list resource files in the following format: `organizations/{org}/environments/{env}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "required": true, // "type": "string" // }, - // "parent": { - // "description": "Required. Scope as indicated by the URI in which to list key value maps. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", + // "type": { + // "description": "Optional. Type of resource files to list. {{ resource_file_type }}", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/entries", + // "path": "v1/{+parent}/resourcefiles/{type}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListKeyValueEntriesResponse" + // "$ref": "GoogleCloudApigeeV1ListEnvironmentResourcesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36269,238 +39921,101 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Do(opts ...google } -// 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 *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListKeyValueEntriesResponse) 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 "apigee.organizations.environments.optimizedStats.get": +// method id "apigee.organizations.environments.resourcefiles.update": -type OrganizationsEnvironmentsOptimizedStatsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsResourcefilesUpdateCall struct { + s *Service + parent string + type_ string + name string + googleapihttpbody *GoogleApiHttpBody + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Similar to GetStats except that the response is less verbose. +// Update: Updates a resource file. Specify the `Content-Type` as +// `application/octet-stream` or `multipart/form-data`. For more +// information about resource files, see Resource files +// (https://cloud.google.com/apigee/docs/api-platform/develop/resource-files). // -// - name: Resource name for which the interactive query will be -// executed. Use the following format in your request: -// `organizations/{org}/environments/{env}/optimizedStats/{dimensions}` -// Dimensions let you view metrics in meaningful groupings, such as -// `apiproxy`, `target_host`. The value of `dimensions` should be a -// comma-separated list as shown below: -// `organizations/{org}/environments/{env}/optimizedStats/apiproxy,requ -// est_verb`. -func (r *OrganizationsEnvironmentsOptimizedStatsService) Get(name string) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c := &OrganizationsEnvironmentsOptimizedStatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: ID of the resource file to update. Must match the regular +// expression: [a-zA-Z0-9:/\\!@#$%^&{}\\ ()+\-=,.~'` ]{1,255}. +// - parent: Name of the environment in the following format: +// `organizations/{org}/environments/{env}`. +// - type: Resource file type. {{ resource_file_type }}. +func (r *OrganizationsEnvironmentsResourcefilesService) Update(parent string, type_ string, name string, googleapihttpbody *GoogleApiHttpBody) *OrganizationsEnvironmentsResourcefilesUpdateCall { + c := &OrganizationsEnvironmentsResourcefilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.type_ = type_ c.name = name - return c -} - -// Accuracy sets the optional parameter "accuracy": No longer used by -// Apigee. Supported for backwards compatibility. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Accuracy(accuracy string) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("accuracy", accuracy) - return c -} - -// AggTable sets the optional parameter "aggTable": Table name used to -// query custom aggregate tables. If this parameter is skipped, then -// Apigee will try to retrieve the data from fact tables which will be -// expensive. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) AggTable(aggTable string) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("aggTable", aggTable) - return c -} - -// Filter sets the optional parameter "filter": Filter that enables you -// to drill-down on specific dimension values. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Filter(filter string) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("filter", filter) - return c -} - -// Limit sets the optional parameter "limit": Maximum number of result -// items to return. The default and maximum value that can be returned -// is 14400. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Limit(limit string) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("limit", limit) - return c -} - -// Offset sets the optional parameter "offset": Offset value. Use -// `offset` with `limit` to enable pagination of results. For example, -// to display results 11-20, set limit to `10` and offset to `10`. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Offset(offset string) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("offset", offset) - return c -} - -// Realtime sets the optional parameter "realtime": No longer used by -// Apigee. Supported for backwards compatibility. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Realtime(realtime bool) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("realtime", fmt.Sprint(realtime)) - return c -} - -// Select sets the optional parameter "select": Required. -// Comma-separated list of metrics. For example: -// `sum(message_count),sum(error_count)` -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Select(select_ string) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("select", select_) - return c -} - -// Sonar sets the optional parameter "sonar": Routes the query to API -// Monitoring for the last hour. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Sonar(sonar bool) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("sonar", fmt.Sprint(sonar)) - return c -} - -// Sort sets the optional parameter "sort": Flag that specifies whether -// the sort order should be ascending or descending. Valid values -// include `DESC` and `ASC`. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Sort(sort string) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("sort", sort) - return c -} - -// Sortby sets the optional parameter "sortby": Comma-separated list of -// columns to sort the final result. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Sortby(sortby string) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("sortby", sortby) - return c -} - -// TimeRange sets the optional parameter "timeRange": Required. Time -// interval for the interactive query. Time range is specified in GMT as -// `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59` -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) TimeRange(timeRange string) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("timeRange", timeRange) - return c -} - -// TimeUnit sets the optional parameter "timeUnit": Granularity of -// metrics returned. Valid values include: `second`, `minute`, `hour`, -// `day`, `week`, or `month`. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) TimeUnit(timeUnit string) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("timeUnit", timeUnit) - return c -} - -// Topk sets the optional parameter "topk": Top number of results to -// return. For example, to return the top 5 results, set `topk=5`. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Topk(topk string) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("topk", topk) - return c -} - -// TsAscending sets the optional parameter "tsAscending": Flag that -// specifies whether to list timestamps in ascending (`true`) or -// descending (`false`) order. Apigee recommends setting this value to -// `true` if you are using `sortby` with `sort=DESC`. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) TsAscending(tsAscending bool) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("tsAscending", fmt.Sprint(tsAscending)) - return c -} - -// Tzo sets the optional parameter "tzo": Timezone offset value. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Tzo(tzo string) *OrganizationsEnvironmentsOptimizedStatsGetCall { - c.urlParams_.Set("tzo", tzo) + c.googleapihttpbody = googleapihttpbody return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsOptimizedStatsGetCall { +func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesUpdateCall { 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 *OrganizationsEnvironmentsOptimizedStatsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsOptimizedStatsGetCall { - 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 *OrganizationsEnvironmentsOptimizedStatsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsOptimizedStatsGetCall { +func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/resourcefiles/{type}/{name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, + "type": c.type_, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.optimizedStats.get" call. -// Exactly one of *GoogleCloudApigeeV1OptimizedStats or error will be +// Do executes the "apigee.organizations.environments.resourcefiles.update" call. +// Exactly one of *GoogleCloudApigeeV1ResourceFile or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1OptimizedStats.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 *OrganizationsEnvironmentsOptimizedStatsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1OptimizedStats, error) { +// either *GoogleCloudApigeeV1ResourceFile.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 *OrganizationsEnvironmentsResourcefilesUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ResourceFile, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36519,7 +40034,7 @@ func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1OptimizedStats{ + ret := &GoogleCloudApigeeV1ResourceFile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36531,100 +40046,42 @@ func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Similar to GetStats except that the response is less verbose.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/optimizedStats/{optimizedStatsId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.optimizedStats.get", + // "description": "Updates a resource file. Specify the `Content-Type` as `application/octet-stream` or `multipart/form-data`. For more information about resource files, see [Resource files](https://cloud.google.com/apigee/docs/api-platform/develop/resource-files).", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/resourcefiles/{type}/{name}", + // "httpMethod": "PUT", + // "id": "apigee.organizations.environments.resourcefiles.update", // "parameterOrder": [ + // "parent", + // "type", // "name" // ], // "parameters": { - // "accuracy": { - // "description": "No longer used by Apigee. Supported for backwards compatibility.", - // "location": "query", - // "type": "string" - // }, - // "aggTable": { - // "description": "Table name used to query custom aggregate tables. If this parameter is skipped, then Apigee will try to retrieve the data from fact tables which will be expensive.", - // "location": "query", - // "type": "string" - // }, - // "filter": { - // "description": "Filter that enables you to drill-down on specific dimension values.", - // "location": "query", - // "type": "string" - // }, - // "limit": { - // "description": "Maximum number of result items to return. The default and maximum value that can be returned is 14400.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "Required. Resource name for which the interactive query will be executed. Use the following format in your request: `organizations/{org}/environments/{env}/optimizedStats/{dimensions}` Dimensions let you view metrics in meaningful groupings, such as `apiproxy`, `target_host`. The value of `dimensions` should be a comma-separated list as shown below: `organizations/{org}/environments/{env}/optimizedStats/apiproxy,request_verb`", + // "description": "Required. ID of the resource file to update. Must match the regular expression: [a-zA-Z0-9:/\\\\!@#$%^\u0026{}\\[\\]()+\\-=,.~'` ]{1,255}", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/optimizedStats/.*$", // "required": true, // "type": "string" // }, - // "offset": { - // "description": "Offset value. Use `offset` with `limit` to enable pagination of results. For example, to display results 11-20, set limit to `10` and offset to `10`.", - // "location": "query", - // "type": "string" - // }, - // "realtime": { - // "description": "No longer used by Apigee. Supported for backwards compatibility.", - // "location": "query", - // "type": "boolean" - // }, - // "select": { - // "description": "Required. Comma-separated list of metrics. For example: `sum(message_count),sum(error_count)`", - // "location": "query", - // "type": "string" - // }, - // "sonar": { - // "description": "Routes the query to API Monitoring for the last hour.", - // "location": "query", - // "type": "boolean" - // }, - // "sort": { - // "description": "Flag that specifies whether the sort order should be ascending or descending. Valid values include `DESC` and `ASC`.", - // "location": "query", - // "type": "string" - // }, - // "sortby": { - // "description": "Comma-separated list of columns to sort the final result.", - // "location": "query", - // "type": "string" - // }, - // "timeRange": { - // "description": "Required. Time interval for the interactive query. Time range is specified in GMT as `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59`", - // "location": "query", - // "type": "string" - // }, - // "timeUnit": { - // "description": "Granularity of metrics returned. Valid values include: `second`, `minute`, `hour`, `day`, `week`, or `month`.", - // "location": "query", - // "type": "string" - // }, - // "topk": { - // "description": "Top number of results to return. For example, to return the top 5 results, set `topk=5`.", - // "location": "query", + // "parent": { + // "description": "Required. Name of the environment in the following format: `organizations/{org}/environments/{env}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "required": true, // "type": "string" // }, - // "tsAscending": { - // "description": "Flag that specifies whether to list timestamps in ascending (`true`) or descending (`false`) order. Apigee recommends setting this value to `true` if you are using `sortby` with `sort=DESC`.", - // "location": "query", - // "type": "boolean" - // }, - // "tzo": { - // "description": "Timezone offset value.", - // "location": "query", + // "type": { + // "description": "Required. Resource file type. {{ resource_file_type }}", + // "location": "path", + // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/resourcefiles/{type}/{name}", + // "request": { + // "$ref": "GoogleApiHttpBody" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1OptimizedStats" + // "$ref": "GoogleCloudApigeeV1ResourceFile" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36633,35 +40090,35 @@ func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Do(opts ...googleapi.Ca } -// method id "apigee.organizations.environments.queries.create": +// method id "apigee.organizations.environments.securityReports.create": -type OrganizationsEnvironmentsQueriesCreateCall struct { - s *Service - parent string - googlecloudapigeev1query *GoogleCloudApigeeV1Query - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsSecurityReportsCreateCall struct { + s *Service + parent string + googlecloudapigeev1securityreportquery *GoogleCloudApigeeV1SecurityReportQuery + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Submit a query to be processed in the background. If the -// submission of the query succeeds, the API returns a 201 status and an -// ID that refer to the query. In addition to the HTTP status 201, the +// Create: Submit a report request to be processed in the background. If +// the submission succeeds, the API returns a 200 status and an ID that +// refer to the report request. In addition to the HTTP status 200, the // `state` of "enqueued" means that the request succeeded. // // - parent: The parent resource name. Must be of the form // `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsQueriesService) Create(parent string, googlecloudapigeev1query *GoogleCloudApigeeV1Query) *OrganizationsEnvironmentsQueriesCreateCall { - c := &OrganizationsEnvironmentsQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsEnvironmentsSecurityReportsService) Create(parent string, googlecloudapigeev1securityreportquery *GoogleCloudApigeeV1SecurityReportQuery) *OrganizationsEnvironmentsSecurityReportsCreateCall { + c := &OrganizationsEnvironmentsSecurityReportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1query = googlecloudapigeev1query + c.googlecloudapigeev1securityreportquery = googlecloudapigeev1securityreportquery return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsQueriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesCreateCall { +func (c *OrganizationsEnvironmentsSecurityReportsCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSecurityReportsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36669,21 +40126,21 @@ func (c *OrganizationsEnvironmentsQueriesCreateCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsQueriesCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsQueriesCreateCall { +func (c *OrganizationsEnvironmentsSecurityReportsCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsSecurityReportsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsQueriesCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsSecurityReportsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsQueriesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsSecurityReportsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -36691,14 +40148,14 @@ func (c *OrganizationsEnvironmentsQueriesCreateCall) doRequest(alt string) (*htt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1query) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1securityreportquery) 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, "v1/{+parent}/queries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/securityReports") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -36711,14 +40168,15 @@ func (c *OrganizationsEnvironmentsQueriesCreateCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.queries.create" call. -// Exactly one of *GoogleCloudApigeeV1AsyncQuery or error will be +// Do executes the "apigee.organizations.environments.securityReports.create" call. +// Exactly one of *GoogleCloudApigeeV1SecurityReport or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1AsyncQuery.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 *OrganizationsEnvironmentsQueriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQuery, error) { +// either *GoogleCloudApigeeV1SecurityReport.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 *OrganizationsEnvironmentsSecurityReportsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1SecurityReport, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36737,7 +40195,7 @@ func (c *OrganizationsEnvironmentsQueriesCreateCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1AsyncQuery{ + ret := &GoogleCloudApigeeV1SecurityReport{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36749,10 +40207,10 @@ func (c *OrganizationsEnvironmentsQueriesCreateCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Submit a query to be processed in the background. If the submission of the query succeeds, the API returns a 201 status and an ID that refer to the query. In addition to the HTTP status 201, the `state` of \"enqueued\" means that the request succeeded.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/queries", + // "description": "Submit a report request to be processed in the background. If the submission succeeds, the API returns a 200 status and an ID that refer to the report request. In addition to the HTTP status 200, the `state` of \"enqueued\" means that the request succeeded.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/securityReports", // "httpMethod": "POST", - // "id": "apigee.organizations.environments.queries.create", + // "id": "apigee.organizations.environments.securityReports.create", // "parameterOrder": [ // "parent" // ], @@ -36765,12 +40223,12 @@ func (c *OrganizationsEnvironmentsQueriesCreateCall) Do(opts ...googleapi.CallOp // "type": "string" // } // }, - // "path": "v1/{+parent}/queries", + // "path": "v1/{+parent}/securityReports", // "request": { - // "$ref": "GoogleCloudApigeeV1Query" + // "$ref": "GoogleCloudApigeeV1SecurityReportQuery" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1AsyncQuery" + // "$ref": "GoogleCloudApigeeV1SecurityReport" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36779,9 +40237,9 @@ func (c *OrganizationsEnvironmentsQueriesCreateCall) Do(opts ...googleapi.CallOp } -// method id "apigee.organizations.environments.queries.get": +// method id "apigee.organizations.environments.securityReports.get": -type OrganizationsEnvironmentsQueriesGetCall struct { +type OrganizationsEnvironmentsSecurityReportsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -36790,14 +40248,14 @@ type OrganizationsEnvironmentsQueriesGetCall struct { header_ http.Header } -// Get: Get query status If the query is still in progress, the `state` -// is set to "running" After the query has completed successfully, -// `state` is set to "completed" +// Get: Get security report status If the query is still in progress, +// the `state` is set to "running" After the query has completed +// successfully, `state` is set to "completed" // -// - name: Name of the asynchronous query to get. Must be of the form -// `organizations/{org}/environments/{env}/queries/{queryId}`. -func (r *OrganizationsEnvironmentsQueriesService) Get(name string) *OrganizationsEnvironmentsQueriesGetCall { - c := &OrganizationsEnvironmentsQueriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the security report to get. Must be of the form +// `organizations/{org}/environments/{env}/securityReports/{reportId}`. +func (r *OrganizationsEnvironmentsSecurityReportsService) Get(name string) *OrganizationsEnvironmentsSecurityReportsGetCall { + c := &OrganizationsEnvironmentsSecurityReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -36805,7 +40263,7 @@ func (r *OrganizationsEnvironmentsQueriesService) Get(name string) *Organization // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsQueriesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesGetCall { +func (c *OrganizationsEnvironmentsSecurityReportsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSecurityReportsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36815,7 +40273,7 @@ func (c *OrganizationsEnvironmentsQueriesGetCall) Fields(s ...googleapi.Field) * // 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 *OrganizationsEnvironmentsQueriesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsQueriesGetCall { +func (c *OrganizationsEnvironmentsSecurityReportsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsSecurityReportsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -36823,21 +40281,21 @@ func (c *OrganizationsEnvironmentsQueriesGetCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsQueriesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsQueriesGetCall { +func (c *OrganizationsEnvironmentsSecurityReportsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsSecurityReportsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsQueriesGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsSecurityReportsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsQueriesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsSecurityReportsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -36863,14 +40321,15 @@ func (c *OrganizationsEnvironmentsQueriesGetCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.queries.get" call. -// Exactly one of *GoogleCloudApigeeV1AsyncQuery or error will be +// Do executes the "apigee.organizations.environments.securityReports.get" call. +// Exactly one of *GoogleCloudApigeeV1SecurityReport or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1AsyncQuery.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 *OrganizationsEnvironmentsQueriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQuery, error) { +// either *GoogleCloudApigeeV1SecurityReport.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 *OrganizationsEnvironmentsSecurityReportsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1SecurityReport, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36889,7 +40348,7 @@ func (c *OrganizationsEnvironmentsQueriesGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1AsyncQuery{ + ret := &GoogleCloudApigeeV1SecurityReport{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36901,25 +40360,25 @@ func (c *OrganizationsEnvironmentsQueriesGetCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Get query status If the query is still in progress, the `state` is set to \"running\" After the query has completed successfully, `state` is set to \"completed\"", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/queries/{queriesId}", + // "description": "Get security report status If the query is still in progress, the `state` is set to \"running\" After the query has completed successfully, `state` is set to \"completed\"", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/securityReports/{securityReportsId}", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.queries.get", + // "id": "apigee.organizations.environments.securityReports.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the asynchronous query to get. Must be of the form `organizations/{org}/environments/{env}/queries/{queryId}`.", + // "description": "Required. Name of the security report to get. Must be of the form `organizations/{org}/environments/{env}/securityReports/{reportId}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/queries/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/securityReports/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1AsyncQuery" + // "$ref": "GoogleCloudApigeeV1SecurityReport" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36928,9 +40387,9 @@ func (c *OrganizationsEnvironmentsQueriesGetCall) Do(opts ...googleapi.CallOptio } -// method id "apigee.organizations.environments.queries.getResult": +// method id "apigee.organizations.environments.securityReports.getResult": -type OrganizationsEnvironmentsQueriesGetResultCall struct { +type OrganizationsEnvironmentsSecurityReportsGetResultCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -36940,16 +40399,18 @@ type OrganizationsEnvironmentsQueriesGetResultCall struct { } // GetResult: After the query is completed, use this API to retrieve the -// results. If the request succeeds, and there is a non-zero result set, -// the result is downloaded to the client as a zipped JSON file. The -// name of the downloaded file will be: OfflineQueryResult-.zip Example: +// results as file. If the request succeeds, and there is a non-zero +// result set, the result is downloaded to the client as a zipped JSON +// file. The name of the downloaded file will be: +// OfflineQueryResult-.zip Example: // `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip` // -// - name: Name of the asynchronous query result to get. Must be of the +// - name: Name of the security report result to get. Must be of the // form -// `organizations/{org}/environments/{env}/queries/{queryId}/result`. -func (r *OrganizationsEnvironmentsQueriesService) GetResult(name string) *OrganizationsEnvironmentsQueriesGetResultCall { - c := &OrganizationsEnvironmentsQueriesGetResultCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `organizations/{org}/environments/{env}/securityReports/{reportId}/r +// esult`. +func (r *OrganizationsEnvironmentsSecurityReportsService) GetResult(name string) *OrganizationsEnvironmentsSecurityReportsGetResultCall { + c := &OrganizationsEnvironmentsSecurityReportsGetResultCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -36957,7 +40418,7 @@ func (r *OrganizationsEnvironmentsQueriesService) GetResult(name string) *Organi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsQueriesGetResultCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesGetResultCall { +func (c *OrganizationsEnvironmentsSecurityReportsGetResultCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSecurityReportsGetResultCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36967,7 +40428,7 @@ func (c *OrganizationsEnvironmentsQueriesGetResultCall) Fields(s ...googleapi.Fi // 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 *OrganizationsEnvironmentsQueriesGetResultCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsQueriesGetResultCall { +func (c *OrganizationsEnvironmentsSecurityReportsGetResultCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsSecurityReportsGetResultCall { c.ifNoneMatch_ = entityTag return c } @@ -36975,21 +40436,21 @@ func (c *OrganizationsEnvironmentsQueriesGetResultCall) IfNoneMatch(entityTag st // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsQueriesGetResultCall) Context(ctx context.Context) *OrganizationsEnvironmentsQueriesGetResultCall { +func (c *OrganizationsEnvironmentsSecurityReportsGetResultCall) Context(ctx context.Context) *OrganizationsEnvironmentsSecurityReportsGetResultCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsQueriesGetResultCall) Header() http.Header { +func (c *OrganizationsEnvironmentsSecurityReportsGetResultCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsQueriesGetResultCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsSecurityReportsGetResultCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -37015,14 +40476,14 @@ func (c *OrganizationsEnvironmentsQueriesGetResultCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.queries.getResult" call. +// Do executes the "apigee.organizations.environments.securityReports.getResult" call. // Exactly one of *GoogleApiHttpBody or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleApiHttpBody.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 *OrganizationsEnvironmentsQueriesGetResultCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +func (c *OrganizationsEnvironmentsSecurityReportsGetResultCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37053,18 +40514,18 @@ func (c *OrganizationsEnvironmentsQueriesGetResultCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "After the query is completed, use this API to retrieve the results. If the request succeeds, and there is a non-zero result set, the result is downloaded to the client as a zipped JSON file. The name of the downloaded file will be: OfflineQueryResult-.zip Example: `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip`", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/queries/{queriesId}/result", + // "description": "After the query is completed, use this API to retrieve the results as file. If the request succeeds, and there is a non-zero result set, the result is downloaded to the client as a zipped JSON file. The name of the downloaded file will be: OfflineQueryResult-.zip Example: `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip`", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/securityReports/{securityReportsId}/result", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.queries.getResult", + // "id": "apigee.organizations.environments.securityReports.getResult", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the asynchronous query result to get. Must be of the form `organizations/{org}/environments/{env}/queries/{queryId}/result`.", + // "description": "Required. Name of the security report result to get. Must be of the form `organizations/{org}/environments/{env}/securityReports/{reportId}/result`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/queries/[^/]+/result$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/securityReports/[^/]+/result$", // "required": true, // "type": "string" // } @@ -37080,9 +40541,9 @@ func (c *OrganizationsEnvironmentsQueriesGetResultCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.environments.queries.getResulturl": +// method id "apigee.organizations.environments.securityReports.getResultView": -type OrganizationsEnvironmentsQueriesGetResulturlCall struct { +type OrganizationsEnvironmentsSecurityReportsGetResultViewCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -37091,17 +40552,15 @@ type OrganizationsEnvironmentsQueriesGetResulturlCall struct { header_ http.Header } -// GetResulturl: After the query is completed, use this API to retrieve -// the results. If the request succeeds, and there is a non-zero result -// set, the result is sent to the client as a list of urls to JSON -// files. +// GetResultView: After the query is completed, use this API to view the +// query result when result size is small. // -// - name: Name of the asynchronous query result to get. Must be of the -// form -// `organizations/{org}/environments/{env}/queries/{queryId}/resulturl` -// . -func (r *OrganizationsEnvironmentsQueriesService) GetResulturl(name string) *OrganizationsEnvironmentsQueriesGetResulturlCall { - c := &OrganizationsEnvironmentsQueriesGetResulturlCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the security report result view to get. Must be of +// the form +// `organizations/{org}/environments/{env}/securityReports/{reportId}/r +// esultView`. +func (r *OrganizationsEnvironmentsSecurityReportsService) GetResultView(name string) *OrganizationsEnvironmentsSecurityReportsGetResultViewCall { + c := &OrganizationsEnvironmentsSecurityReportsGetResultViewCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -37109,7 +40568,7 @@ func (r *OrganizationsEnvironmentsQueriesService) GetResulturl(name string) *Org // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesGetResulturlCall { +func (c *OrganizationsEnvironmentsSecurityReportsGetResultViewCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSecurityReportsGetResultViewCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -37119,7 +40578,7 @@ func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) Fields(s ...googleapi // 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 *OrganizationsEnvironmentsQueriesGetResulturlCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsQueriesGetResulturlCall { +func (c *OrganizationsEnvironmentsSecurityReportsGetResultViewCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsSecurityReportsGetResultViewCall { c.ifNoneMatch_ = entityTag return c } @@ -37127,21 +40586,21 @@ func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) Context(ctx context.Context) *OrganizationsEnvironmentsQueriesGetResulturlCall { +func (c *OrganizationsEnvironmentsSecurityReportsGetResultViewCall) Context(ctx context.Context) *OrganizationsEnvironmentsSecurityReportsGetResultViewCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) Header() http.Header { +func (c *OrganizationsEnvironmentsSecurityReportsGetResultViewCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsSecurityReportsGetResultViewCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -37167,16 +40626,16 @@ func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.queries.getResulturl" call. -// Exactly one of *GoogleCloudApigeeV1GetAsyncQueryResultUrlResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "apigee.organizations.environments.securityReports.getResultView" call. +// Exactly one of *GoogleCloudApigeeV1SecurityReportResultView or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudApigeeV1GetAsyncQueryResultUrlResponse.ServerResponse.Head -// er or (if a response was returned at all) in +// *GoogleCloudApigeeV1SecurityReportResultView.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 *OrganizationsEnvironmentsQueriesGetResulturlCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1GetAsyncQueryResultUrlResponse, error) { +func (c *OrganizationsEnvironmentsSecurityReportsGetResultViewCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1SecurityReportResultView, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37195,7 +40654,7 @@ func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1GetAsyncQueryResultUrlResponse{ + ret := &GoogleCloudApigeeV1SecurityReportResultView{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37207,25 +40666,25 @@ func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "After the query is completed, use this API to retrieve the results. If the request succeeds, and there is a non-zero result set, the result is sent to the client as a list of urls to JSON files.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/queries/{queriesId}/resulturl", + // "description": "After the query is completed, use this API to view the query result when result size is small.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/securityReports/{securityReportsId}/resultView", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.queries.getResulturl", + // "id": "apigee.organizations.environments.securityReports.getResultView", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the asynchronous query result to get. Must be of the form `organizations/{org}/environments/{env}/queries/{queryId}/resulturl`.", + // "description": "Required. Name of the security report result view to get. Must be of the form `organizations/{org}/environments/{env}/securityReports/{reportId}/resultView`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/queries/[^/]+/resulturl$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/securityReports/[^/]+/resultView$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1GetAsyncQueryResultUrlResponse" + // "$ref": "GoogleCloudApigeeV1SecurityReportResultView" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -37234,9 +40693,9 @@ func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.queries.list": +// method id "apigee.organizations.environments.securityReports.list": -type OrganizationsEnvironmentsQueriesListCall struct { +type OrganizationsEnvironmentsSecurityReportsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -37245,57 +40704,63 @@ type OrganizationsEnvironmentsQueriesListCall struct { header_ http.Header } -// List: Return a list of Asynchronous Queries +// List: Return a list of Security Reports // // - parent: The parent resource name. Must be of the form // `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsQueriesService) List(parent string) *OrganizationsEnvironmentsQueriesListCall { - c := &OrganizationsEnvironmentsQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsEnvironmentsSecurityReportsService) List(parent string) *OrganizationsEnvironmentsSecurityReportsListCall { + c := &OrganizationsEnvironmentsSecurityReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Dataset sets the optional parameter "dataset": Filter response list // by dataset. Example: `api`, `mint` -func (c *OrganizationsEnvironmentsQueriesListCall) Dataset(dataset string) *OrganizationsEnvironmentsQueriesListCall { +func (c *OrganizationsEnvironmentsSecurityReportsListCall) Dataset(dataset string) *OrganizationsEnvironmentsSecurityReportsListCall { c.urlParams_.Set("dataset", dataset) return c } // From sets the optional parameter "from": Filter response list by -// returning asynchronous queries that created after this date time. -// Time must be in ISO date-time format like '2011-12-03T10:15:30Z'. -func (c *OrganizationsEnvironmentsQueriesListCall) From(from string) *OrganizationsEnvironmentsQueriesListCall { +// returning security reports that created after this date time. Time +// must be in ISO date-time format like '2011-12-03T10:15:30Z'. +func (c *OrganizationsEnvironmentsSecurityReportsListCall) From(from string) *OrganizationsEnvironmentsSecurityReportsListCall { c.urlParams_.Set("from", from) return c } -// InclQueriesWithoutReport sets the optional parameter -// "inclQueriesWithoutReport": Flag to include asynchronous queries that -// don't have a report denifition. -func (c *OrganizationsEnvironmentsQueriesListCall) InclQueriesWithoutReport(inclQueriesWithoutReport string) *OrganizationsEnvironmentsQueriesListCall { - c.urlParams_.Set("inclQueriesWithoutReport", inclQueriesWithoutReport) +// PageSize sets the optional parameter "pageSize": The maximum number +// of security report to return in the list response. +func (c *OrganizationsEnvironmentsSecurityReportsListCall) PageSize(pageSize int64) *OrganizationsEnvironmentsSecurityReportsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token returned +// from the previous list response to fetch the next page. +func (c *OrganizationsEnvironmentsSecurityReportsListCall) PageToken(pageToken string) *OrganizationsEnvironmentsSecurityReportsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Status sets the optional parameter "status": Filter response list by -// asynchronous query status. -func (c *OrganizationsEnvironmentsQueriesListCall) Status(status string) *OrganizationsEnvironmentsQueriesListCall { +// security reports status. +func (c *OrganizationsEnvironmentsSecurityReportsListCall) Status(status string) *OrganizationsEnvironmentsSecurityReportsListCall { c.urlParams_.Set("status", status) return c } // SubmittedBy sets the optional parameter "submittedBy": Filter // response list by user who submitted queries. -func (c *OrganizationsEnvironmentsQueriesListCall) SubmittedBy(submittedBy string) *OrganizationsEnvironmentsQueriesListCall { +func (c *OrganizationsEnvironmentsSecurityReportsListCall) SubmittedBy(submittedBy string) *OrganizationsEnvironmentsSecurityReportsListCall { c.urlParams_.Set("submittedBy", submittedBy) return c } // To sets the optional parameter "to": Filter response list by -// returning asynchronous queries that created before this date time. -// Time must be in ISO date-time format like '2011-12-03T10:16:30Z'. -func (c *OrganizationsEnvironmentsQueriesListCall) To(to string) *OrganizationsEnvironmentsQueriesListCall { +// returning security reports that created before this date time. Time +// must be in ISO date-time format like '2011-12-03T10:16:30Z'. +func (c *OrganizationsEnvironmentsSecurityReportsListCall) To(to string) *OrganizationsEnvironmentsSecurityReportsListCall { c.urlParams_.Set("to", to) return c } @@ -37303,7 +40768,7 @@ func (c *OrganizationsEnvironmentsQueriesListCall) To(to string) *OrganizationsE // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesListCall { +func (c *OrganizationsEnvironmentsSecurityReportsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSecurityReportsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -37313,7 +40778,7 @@ func (c *OrganizationsEnvironmentsQueriesListCall) Fields(s ...googleapi.Field) // 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 *OrganizationsEnvironmentsQueriesListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsQueriesListCall { +func (c *OrganizationsEnvironmentsSecurityReportsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsSecurityReportsListCall { c.ifNoneMatch_ = entityTag return c } @@ -37321,21 +40786,21 @@ func (c *OrganizationsEnvironmentsQueriesListCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsQueriesListCall) Context(ctx context.Context) *OrganizationsEnvironmentsQueriesListCall { +func (c *OrganizationsEnvironmentsSecurityReportsListCall) Context(ctx context.Context) *OrganizationsEnvironmentsSecurityReportsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsQueriesListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsSecurityReportsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsQueriesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsSecurityReportsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -37348,7 +40813,7 @@ func (c *OrganizationsEnvironmentsQueriesListCall) doRequest(alt string) (*http. var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/queries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/securityReports") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -37361,16 +40826,16 @@ func (c *OrganizationsEnvironmentsQueriesListCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.queries.list" call. -// Exactly one of *GoogleCloudApigeeV1ListAsyncQueriesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "apigee.organizations.environments.securityReports.list" call. +// Exactly one of *GoogleCloudApigeeV1ListSecurityReportsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudApigeeV1ListAsyncQueriesResponse.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudApigeeV1ListSecurityReportsResponse.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 *OrganizationsEnvironmentsQueriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListAsyncQueriesResponse, error) { +func (c *OrganizationsEnvironmentsSecurityReportsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListSecurityReportsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37389,7 +40854,7 @@ func (c *OrganizationsEnvironmentsQueriesListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListAsyncQueriesResponse{ + ret := &GoogleCloudApigeeV1ListSecurityReportsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37401,10 +40866,10 @@ func (c *OrganizationsEnvironmentsQueriesListCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Return a list of Asynchronous Queries", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/queries", + // "description": "Return a list of Security Reports", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/securityReports", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.queries.list", + // "id": "apigee.organizations.environments.securityReports.list", // "parameterOrder": [ // "parent" // ], @@ -37415,12 +40880,18 @@ func (c *OrganizationsEnvironmentsQueriesListCall) Do(opts ...googleapi.CallOpti // "type": "string" // }, // "from": { - // "description": "Filter response list by returning asynchronous queries that created after this date time. Time must be in ISO date-time format like '2011-12-03T10:15:30Z'.", + // "description": "Filter response list by returning security reports that created after this date time. Time must be in ISO date-time format like '2011-12-03T10:15:30Z'.", // "location": "query", // "type": "string" // }, - // "inclQueriesWithoutReport": { - // "description": "Flag to include asynchronous queries that don't have a report denifition.", + // "pageSize": { + // "description": "The maximum number of security report to return in the list response.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token returned from the previous list response to fetch the next page.", // "location": "query", // "type": "string" // }, @@ -37432,7 +40903,7 @@ func (c *OrganizationsEnvironmentsQueriesListCall) Do(opts ...googleapi.CallOpti // "type": "string" // }, // "status": { - // "description": "Filter response list by asynchronous query status.", + // "description": "Filter response list by security reports status.", // "location": "query", // "type": "string" // }, @@ -37442,14 +40913,14 @@ func (c *OrganizationsEnvironmentsQueriesListCall) Do(opts ...googleapi.CallOpti // "type": "string" // }, // "to": { - // "description": "Filter response list by returning asynchronous queries that created before this date time. Time must be in ISO date-time format like '2011-12-03T10:16:30Z'.", + // "description": "Filter response list by returning security reports that created before this date time. Time must be in ISO date-time format like '2011-12-03T10:16:30Z'.", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+parent}/queries", + // "path": "v1/{+parent}/securityReports", // "response": { - // "$ref": "GoogleCloudApigeeV1ListAsyncQueriesResponse" + // "$ref": "GoogleCloudApigeeV1ListSecurityReportsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -37458,72 +40929,100 @@ func (c *OrganizationsEnvironmentsQueriesListCall) Do(opts ...googleapi.CallOpti } -// method id "apigee.organizations.environments.references.create": +// 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 *OrganizationsEnvironmentsSecurityReportsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListSecurityReportsResponse) 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) + } +} -type OrganizationsEnvironmentsReferencesCreateCall struct { - s *Service - parent string - googlecloudapigeev1reference *GoogleCloudApigeeV1Reference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "apigee.organizations.environments.sharedflows.deployments.list": + +type OrganizationsEnvironmentsSharedflowsDeploymentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Reference in the specified environment. +// List: Lists all deployments of a shared flow in an environment. // -// - parent: The parent environment name under which the Reference will -// be created. Must be of the form -// `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsReferencesService) Create(parent string, googlecloudapigeev1reference *GoogleCloudApigeeV1Reference) *OrganizationsEnvironmentsReferencesCreateCall { - c := &OrganizationsEnvironmentsReferencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name representing a shared flow in an environment in the +// following format: +// `organizations/{org}/environments/{env}/sharedflows/{sharedflow}`. +func (r *OrganizationsEnvironmentsSharedflowsDeploymentsService) List(parent string) *OrganizationsEnvironmentsSharedflowsDeploymentsListCall { + c := &OrganizationsEnvironmentsSharedflowsDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1reference = googlecloudapigeev1reference return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsReferencesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsReferencesCreateCall { +func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSharedflowsDeploymentsListCall { 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 *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsSharedflowsDeploymentsListCall { + 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 *OrganizationsEnvironmentsReferencesCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsReferencesCreateCall { +func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Context(ctx context.Context) *OrganizationsEnvironmentsSharedflowsDeploymentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsReferencesCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsReferencesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1reference) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/references") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -37534,14 +41033,16 @@ func (c *OrganizationsEnvironmentsReferencesCreateCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.references.create" call. -// Exactly one of *GoogleCloudApigeeV1Reference or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Reference.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 *OrganizationsEnvironmentsReferencesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Reference, error) { +// Do executes the "apigee.organizations.environments.sharedflows.deployments.list" call. +// Exactly one of *GoogleCloudApigeeV1ListDeploymentsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListDeploymentsResponse.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 *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeploymentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37560,7 +41061,7 @@ func (c *OrganizationsEnvironmentsReferencesCreateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Reference{ + ret := &GoogleCloudApigeeV1ListDeploymentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37572,28 +41073,25 @@ func (c *OrganizationsEnvironmentsReferencesCreateCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Creates a Reference in the specified environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/references", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.references.create", + // "description": "Lists all deployments of a shared flow in an environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/sharedflows/{sharedflowsId}/deployments", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.sharedflows.deployments.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The parent environment name under which the Reference will be created. Must be of the form `organizations/{org}/environments/{env}`.", + // "description": "Required. Name representing a shared flow in an environment in the following format: `organizations/{org}/environments/{env}/sharedflows/{sharedflow}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/sharedflows/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/references", - // "request": { - // "$ref": "GoogleCloudApigeeV1Reference" - // }, + // "path": "v1/{+parent}/deployments", // "response": { - // "$ref": "GoogleCloudApigeeV1Reference" + // "$ref": "GoogleCloudApigeeV1ListDeploymentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -37602,9 +41100,9 @@ func (c *OrganizationsEnvironmentsReferencesCreateCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.environments.references.delete": +// method id "apigee.organizations.environments.sharedflows.revisions.deploy": -type OrganizationsEnvironmentsReferencesDeleteCall struct { +type OrganizationsEnvironmentsSharedflowsRevisionsDeployCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -37612,21 +41110,53 @@ type OrganizationsEnvironmentsReferencesDeleteCall struct { header_ http.Header } -// Delete: Deletes a Reference from an environment. Returns the deleted -// Reference resource. +// Deploy: Deploys a revision of a shared flow. If another revision of +// the same shared flow is currently deployed, set the `override` +// parameter to `true` to have this revision replace the currently +// deployed revision. You cannot use a shared flow until it has been +// deployed to an environment. For a request path +// `organizations/{org}/environments/{env}/sharedflows/{sf}/revisions/{re +// v}/deployments`, two permissions are required: * +// `apigee.deployments.create` on the resource +// `organizations/{org}/environments/{env}` * +// `apigee.sharedflowrevisions.deploy` on the resource +// `organizations/{org}/sharedflows/{sf}/revisions/{rev}` // -// - name: The name of the Reference to delete. Must be of the form -// `organizations/{org}/environments/{env}/references/{ref}`. -func (r *OrganizationsEnvironmentsReferencesService) Delete(name string) *OrganizationsEnvironmentsReferencesDeleteCall { - c := &OrganizationsEnvironmentsReferencesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the shared flow revision to deploy in the following +// format: +// `organizations/{org}/environments/{env}/sharedflows/{sharedflow}/rev +// isions/{rev}`. +func (r *OrganizationsEnvironmentsSharedflowsRevisionsService) Deploy(name string) *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall { + c := &OrganizationsEnvironmentsSharedflowsRevisionsDeployCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Override sets the optional parameter "override": Flag that specifies +// whether the new deployment replaces other deployed revisions of the +// shared flow in the environment. Set `override` to `true` to replace +// other deployed revisions. By default, `override` is `false` and the +// deployment is rejected if other revisions of the shared flow are +// deployed in the environment. +func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Override(override bool) *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall { + c.urlParams_.Set("override", fmt.Sprint(override)) + return c +} + +// ServiceAccount sets the optional parameter "serviceAccount": Google +// Cloud IAM service account. The service account represents the +// identity of the deployed proxy, and determines what permissions it +// has. The format must be +// `{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`. +func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) ServiceAccount(serviceAccount string) *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall { + c.urlParams_.Set("serviceAccount", serviceAccount) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsReferencesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsReferencesDeleteCall { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -37634,21 +41164,21 @@ func (c *OrganizationsEnvironmentsReferencesDeleteCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsReferencesDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsReferencesDeleteCall { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Context(ctx context.Context) *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsReferencesDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsReferencesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -37658,9 +41188,9 @@ func (c *OrganizationsEnvironmentsReferencesDeleteCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/deployments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -37671,14 +41201,14 @@ func (c *OrganizationsEnvironmentsReferencesDeleteCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.references.delete" call. -// Exactly one of *GoogleCloudApigeeV1Reference or error will be +// Do executes the "apigee.organizations.environments.sharedflows.revisions.deploy" call. +// Exactly one of *GoogleCloudApigeeV1Deployment or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Reference.ServerResponse.Header or (if a +// either *GoogleCloudApigeeV1Deployment.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 *OrganizationsEnvironmentsReferencesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Reference, error) { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Deployment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37697,7 +41227,7 @@ func (c *OrganizationsEnvironmentsReferencesDeleteCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Reference{ + ret := &GoogleCloudApigeeV1Deployment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37709,25 +41239,35 @@ func (c *OrganizationsEnvironmentsReferencesDeleteCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Deletes a Reference from an environment. Returns the deleted Reference resource.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/references/{referencesId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.references.delete", + // "description": "Deploys a revision of a shared flow. If another revision of the same shared flow is currently deployed, set the `override` parameter to `true` to have this revision replace the currently deployed revision. You cannot use a shared flow until it has been deployed to an environment. For a request path `organizations/{org}/environments/{env}/sharedflows/{sf}/revisions/{rev}/deployments`, two permissions are required: * `apigee.deployments.create` on the resource `organizations/{org}/environments/{env}` * `apigee.sharedflowrevisions.deploy` on the resource `organizations/{org}/sharedflows/{sf}/revisions/{rev}`", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/sharedflows/{sharedflowsId}/revisions/{revisionsId}/deployments", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.sharedflows.revisions.deploy", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the Reference to delete. Must be of the form `organizations/{org}/environments/{env}/references/{ref}`.", + // "description": "Required. Name of the shared flow revision to deploy in the following format: `organizations/{org}/environments/{env}/sharedflows/{sharedflow}/revisions/{rev}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/references/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/sharedflows/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" + // }, + // "override": { + // "description": "Flag that specifies whether the new deployment replaces other deployed revisions of the shared flow in the environment. Set `override` to `true` to replace other deployed revisions. By default, `override` is `false` and the deployment is rejected if other revisions of the shared flow are deployed in the environment.", + // "location": "query", + // "type": "boolean" + // }, + // "serviceAccount": { + // "description": "Google Cloud IAM service account. The service account represents the identity of the deployed proxy, and determines what permissions it has. The format must be `{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}/deployments", // "response": { - // "$ref": "GoogleCloudApigeeV1Reference" + // "$ref": "GoogleCloudApigeeV1Deployment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -37736,9 +41276,9 @@ func (c *OrganizationsEnvironmentsReferencesDeleteCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.environments.references.get": +// method id "apigee.organizations.environments.sharedflows.revisions.getDeployments": -type OrganizationsEnvironmentsReferencesGetCall struct { +type OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -37747,12 +41287,170 @@ type OrganizationsEnvironmentsReferencesGetCall struct { header_ http.Header } -// Get: Gets a Reference resource. +// GetDeployments: Gets the deployment of a shared flow revision and +// actual state reported by runtime pods. // -// - name: The name of the Reference to get. Must be of the form -// `organizations/{org}/environments/{env}/references/{ref}`. -func (r *OrganizationsEnvironmentsReferencesService) Get(name string) *OrganizationsEnvironmentsReferencesGetCall { - c := &OrganizationsEnvironmentsReferencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name representing a shared flow in an environment in the +// following format: +// `organizations/{org}/environments/{env}/sharedflows/{sharedflow}/rev +// isions/{rev}`. +func (r *OrganizationsEnvironmentsSharedflowsRevisionsService) GetDeployments(name string) *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall { + c := &OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall{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 *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall { + 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 *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall { + 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 *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Context(ctx context.Context) *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+name}/deployments") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.organizations.environments.sharedflows.revisions.getDeployments" call. +// Exactly one of *GoogleCloudApigeeV1Deployment or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1Deployment.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 *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Deployment, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1Deployment{ + ServerResponse: googleapi.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 deployment of a shared flow revision and actual state reported by runtime pods.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/sharedflows/{sharedflowsId}/revisions/{revisionsId}/deployments", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.sharedflows.revisions.getDeployments", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name representing a shared flow in an environment in the following format: `organizations/{org}/environments/{env}/sharedflows/{sharedflow}/revisions/{rev}`", + // "location": "path", + // "pattern": "^organizations/[^/]+/environments/[^/]+/sharedflows/[^/]+/revisions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}/deployments", + // "response": { + // "$ref": "GoogleCloudApigeeV1Deployment" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.environments.sharedflows.revisions.undeploy": + +type OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Undeploy: Undeploys a shared flow revision from an environment. For a +// request path +// `organizations/{org}/environments/{env}/sharedflows/{sf}/revisions/{re +// v}/deployments`, two permissions are required: * +// `apigee.deployments.delete` on the resource +// `organizations/{org}/environments/{env}` * +// `apigee.sharedflowrevisions.undeploy` on the resource +// `organizations/{org}/sharedflows/{sf}/revisions/{rev}` +// +// - name: Name of the shared flow revision to undeploy in the following +// format: +// `organizations/{org}/environments/{env}/sharedflows/{sharedflow}/rev +// isions/{rev}`. +func (r *OrganizationsEnvironmentsSharedflowsRevisionsService) Undeploy(name string) *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall { + c := &OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -37760,54 +41458,41 @@ func (r *OrganizationsEnvironmentsReferencesService) Get(name string) *Organizat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsReferencesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsReferencesGetCall { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall { 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 *OrganizationsEnvironmentsReferencesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsReferencesGetCall { - 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 *OrganizationsEnvironmentsReferencesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsReferencesGetCall { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Context(ctx context.Context) *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsReferencesGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsReferencesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/deployments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -37818,14 +41503,14 @@ func (c *OrganizationsEnvironmentsReferencesGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.references.get" call. -// Exactly one of *GoogleCloudApigeeV1Reference or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Reference.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.environments.sharedflows.revisions.undeploy" 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 *OrganizationsEnvironmentsReferencesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Reference, error) { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37844,7 +41529,7 @@ func (c *OrganizationsEnvironmentsReferencesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Reference{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37856,25 +41541,25 @@ func (c *OrganizationsEnvironmentsReferencesGetCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Gets a Reference resource.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/references/{referencesId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.references.get", + // "description": "Undeploys a shared flow revision from an environment. For a request path `organizations/{org}/environments/{env}/sharedflows/{sf}/revisions/{rev}/deployments`, two permissions are required: * `apigee.deployments.delete` on the resource `organizations/{org}/environments/{env}` * `apigee.sharedflowrevisions.undeploy` on the resource `organizations/{org}/sharedflows/{sf}/revisions/{rev}`", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/sharedflows/{sharedflowsId}/revisions/{revisionsId}/deployments", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.environments.sharedflows.revisions.undeploy", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the Reference to get. Must be of the form `organizations/{org}/environments/{env}/references/{ref}`.", + // "description": "Required. Name of the shared flow revision to undeploy in the following format: `organizations/{org}/environments/{env}/sharedflows/{sharedflow}/revisions/{rev}`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/references/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/sharedflows/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}/deployments", // "response": { - // "$ref": "GoogleCloudApigeeV1Reference" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -37883,73 +41568,202 @@ func (c *OrganizationsEnvironmentsReferencesGetCall) Do(opts ...googleapi.CallOp } -// method id "apigee.organizations.environments.references.update": +// method id "apigee.organizations.environments.stats.get": -type OrganizationsEnvironmentsReferencesUpdateCall struct { - s *Service - name string - googlecloudapigeev1reference *GoogleCloudApigeeV1Reference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsStatsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates an existing Reference. Note that this operation has -// PUT semantics; it will replace the entirety of the existing Reference -// with the resource in the request body. +// Get: Retrieve metrics grouped by dimensions. The types of metrics you +// can retrieve include traffic, message counts, API call latency, +// response size, and cache hits and counts. Dimensions let you view +// metrics in meaningful groups. You can optionally pass dimensions as +// path parameters to the `stats` API. If dimensions are not specified, +// the metrics are computed on the entire set of data for the given time +// range. // -// - name: The name of the Reference to update. Must be of the form -// `organizations/{org}/environments/{env}/references/{ref}`. -func (r *OrganizationsEnvironmentsReferencesService) Update(name string, googlecloudapigeev1reference *GoogleCloudApigeeV1Reference) *OrganizationsEnvironmentsReferencesUpdateCall { - c := &OrganizationsEnvironmentsReferencesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name for which the interactive query will be +// executed. Use the following format in your request: +// `organizations/{org}/environments/{env}/stats/{dimensions}` +// Dimensions let you view metrics in meaningful groupings, such as +// `apiproxy` or `target_host`. The value of dimensions should be a +// comma-separated list, as shown below: +// `organizations/{org}/environments/{env}/stats/apiproxy,request_verb`. +func (r *OrganizationsEnvironmentsStatsService) Get(name string) *OrganizationsEnvironmentsStatsGetCall { + c := &OrganizationsEnvironmentsStatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1reference = googlecloudapigeev1reference + return c +} + +// Accuracy sets the optional parameter "accuracy": No longer used by +// Apigee. Supported for backwards compatibility. +func (c *OrganizationsEnvironmentsStatsGetCall) Accuracy(accuracy string) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("accuracy", accuracy) + return c +} + +// AggTable sets the optional parameter "aggTable": Table name used to +// query custom aggregate tables. If this parameter is skipped, then +// Apigee will try to retrieve the data from fact tables which will be +// expensive. +func (c *OrganizationsEnvironmentsStatsGetCall) AggTable(aggTable string) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("aggTable", aggTable) + return c +} + +// Filter sets the optional parameter "filter": Filter that enables you +// to drill down on specific dimension values. +func (c *OrganizationsEnvironmentsStatsGetCall) Filter(filter string) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("filter", filter) + return c +} + +// Limit sets the optional parameter "limit": Maximum number of result +// items to return. The default and maximum value that can be returned +// is 14400. +func (c *OrganizationsEnvironmentsStatsGetCall) Limit(limit string) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("limit", limit) + return c +} + +// Offset sets the optional parameter "offset": Offset value. Use +// `offset` with `limit` to enable pagination of results. For example, +// to display results 11-20, set limit to `10` and offset to `10`. +func (c *OrganizationsEnvironmentsStatsGetCall) Offset(offset string) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("offset", offset) + return c +} + +// Realtime sets the optional parameter "realtime": No longer used by +// Apigee. Supported for backwards compatibility. +func (c *OrganizationsEnvironmentsStatsGetCall) Realtime(realtime bool) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("realtime", fmt.Sprint(realtime)) + return c +} + +// Select sets the optional parameter "select": Comma-separated list of +// metrics. For example: `sum(message_count),sum(error_count)` +func (c *OrganizationsEnvironmentsStatsGetCall) Select(select_ string) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("select", select_) + return c +} + +// Sonar sets the optional parameter "sonar": Routes the query to API +// Monitoring for the last hour. +func (c *OrganizationsEnvironmentsStatsGetCall) Sonar(sonar bool) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("sonar", fmt.Sprint(sonar)) + return c +} + +// Sort sets the optional parameter "sort": Flag that specifies whether +// the sort order should be ascending or descending. Valid values +// include: `DESC` and `ASC`. +func (c *OrganizationsEnvironmentsStatsGetCall) Sort(sort string) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("sort", sort) + return c +} + +// Sortby sets the optional parameter "sortby": Comma-separated list of +// columns to sort the final result. +func (c *OrganizationsEnvironmentsStatsGetCall) Sortby(sortby string) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("sortby", sortby) + return c +} + +// TimeRange sets the optional parameter "timeRange": Time interval for +// the interactive query. Time range is specified in GMT as `start~end`. +// For example: `04/15/2017 00:00~05/15/2017 23:59` +func (c *OrganizationsEnvironmentsStatsGetCall) TimeRange(timeRange string) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("timeRange", timeRange) + return c +} + +// TimeUnit sets the optional parameter "timeUnit": Granularity of +// metrics returned. Valid values include: `second`, `minute`, `hour`, +// `day`, `week`, or` month`. +func (c *OrganizationsEnvironmentsStatsGetCall) TimeUnit(timeUnit string) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("timeUnit", timeUnit) + return c +} + +// Topk sets the optional parameter "topk": Top number of results to +// return. For example, to return the top 5 results, set `topk=5`. +func (c *OrganizationsEnvironmentsStatsGetCall) Topk(topk string) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("topk", topk) + return c +} + +// TsAscending sets the optional parameter "tsAscending": Flag that +// specifies whether to list timestamps in ascending (`true`) or +// descending (`false`) order. Apigee recommends that you set this value +// to `true` if you are using `sortby` with `sort=DESC`. +func (c *OrganizationsEnvironmentsStatsGetCall) TsAscending(tsAscending bool) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("tsAscending", fmt.Sprint(tsAscending)) + return c +} + +// Tzo sets the optional parameter "tzo": Timezone offset value. +func (c *OrganizationsEnvironmentsStatsGetCall) Tzo(tzo string) *OrganizationsEnvironmentsStatsGetCall { + c.urlParams_.Set("tzo", tzo) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsReferencesUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsReferencesUpdateCall { +func (c *OrganizationsEnvironmentsStatsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsStatsGetCall { 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 *OrganizationsEnvironmentsStatsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsStatsGetCall { + 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 *OrganizationsEnvironmentsReferencesUpdateCall) Context(ctx context.Context) *OrganizationsEnvironmentsReferencesUpdateCall { +func (c *OrganizationsEnvironmentsStatsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsStatsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsReferencesUpdateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsStatsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsReferencesUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsStatsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1reference) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -37960,14 +41774,14 @@ func (c *OrganizationsEnvironmentsReferencesUpdateCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.references.update" call. -// Exactly one of *GoogleCloudApigeeV1Reference or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Reference.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.environments.stats.get" call. +// Exactly one of *GoogleCloudApigeeV1Stats or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1Stats.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 *OrganizationsEnvironmentsReferencesUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Reference, error) { +func (c *OrganizationsEnvironmentsStatsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Stats, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37986,7 +41800,7 @@ func (c *OrganizationsEnvironmentsReferencesUpdateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Reference{ + ret := &GoogleCloudApigeeV1Stats{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37998,28 +41812,100 @@ func (c *OrganizationsEnvironmentsReferencesUpdateCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Updates an existing Reference. Note that this operation has PUT semantics; it will replace the entirety of the existing Reference with the resource in the request body.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/references/{referencesId}", - // "httpMethod": "PUT", - // "id": "apigee.organizations.environments.references.update", + // "description": "Retrieve metrics grouped by dimensions. The types of metrics you can retrieve include traffic, message counts, API call latency, response size, and cache hits and counts. Dimensions let you view metrics in meaningful groups. You can optionally pass dimensions as path parameters to the `stats` API. If dimensions are not specified, the metrics are computed on the entire set of data for the given time range.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/stats/{statsId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.stats.get", // "parameterOrder": [ // "name" // ], // "parameters": { + // "accuracy": { + // "description": "No longer used by Apigee. Supported for backwards compatibility.", + // "location": "query", + // "type": "string" + // }, + // "aggTable": { + // "description": "Table name used to query custom aggregate tables. If this parameter is skipped, then Apigee will try to retrieve the data from fact tables which will be expensive.", + // "location": "query", + // "type": "string" + // }, + // "filter": { + // "description": "Filter that enables you to drill down on specific dimension values.", + // "location": "query", + // "type": "string" + // }, + // "limit": { + // "description": "Maximum number of result items to return. The default and maximum value that can be returned is 14400.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. The name of the Reference to update. Must be of the form `organizations/{org}/environments/{env}/references/{ref}`.", + // "description": "Required. Resource name for which the interactive query will be executed. Use the following format in your request: `organizations/{org}/environments/{env}/stats/{dimensions}` Dimensions let you view metrics in meaningful groupings, such as `apiproxy` or `target_host`. The value of dimensions should be a comma-separated list, as shown below: `organizations/{org}/environments/{env}/stats/apiproxy,request_verb`", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/references/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/stats/.*$", // "required": true, // "type": "string" + // }, + // "offset": { + // "description": "Offset value. Use `offset` with `limit` to enable pagination of results. For example, to display results 11-20, set limit to `10` and offset to `10`.", + // "location": "query", + // "type": "string" + // }, + // "realtime": { + // "description": "No longer used by Apigee. Supported for backwards compatibility.", + // "location": "query", + // "type": "boolean" + // }, + // "select": { + // "description": "Comma-separated list of metrics. For example: `sum(message_count),sum(error_count)`", + // "location": "query", + // "type": "string" + // }, + // "sonar": { + // "description": "Routes the query to API Monitoring for the last hour.", + // "location": "query", + // "type": "boolean" + // }, + // "sort": { + // "description": "Flag that specifies whether the sort order should be ascending or descending. Valid values include: `DESC` and `ASC`.", + // "location": "query", + // "type": "string" + // }, + // "sortby": { + // "description": "Comma-separated list of columns to sort the final result.", + // "location": "query", + // "type": "string" + // }, + // "timeRange": { + // "description": "Time interval for the interactive query. Time range is specified in GMT as `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59`", + // "location": "query", + // "type": "string" + // }, + // "timeUnit": { + // "description": "Granularity of metrics returned. Valid values include: `second`, `minute`, `hour`, `day`, `week`, or` month`.", + // "location": "query", + // "type": "string" + // }, + // "topk": { + // "description": "Top number of results to return. For example, to return the top 5 results, set `topk=5`.", + // "location": "query", + // "type": "string" + // }, + // "tsAscending": { + // "description": "Flag that specifies whether to list timestamps in ascending (`true`) or descending (`false`) order. Apigee recommends that you set this value to `true` if you are using `sortby` with `sort=DESC`.", + // "location": "query", + // "type": "boolean" + // }, + // "tzo": { + // "description": "Timezone offset value.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1Reference" - // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Reference" + // "$ref": "GoogleCloudApigeeV1Stats" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -38028,51 +41914,40 @@ func (c *OrganizationsEnvironmentsReferencesUpdateCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.environments.resourcefiles.create": +// method id "apigee.organizations.environments.targetservers.create": -type OrganizationsEnvironmentsResourcefilesCreateCall struct { - s *Service - parent string - googleapihttpbody *GoogleApiHttpBody - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsTargetserversCreateCall struct { + s *Service + parent string + googlecloudapigeev1targetserver *GoogleCloudApigeeV1TargetServer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a resource file. Specify the `Content-Type` as -// `application/octet-stream` or `multipart/form-data`. For more -// information about resource files, see Resource files -// (https://cloud.google.com/apigee/docs/api-platform/develop/resource-files). +// Create: Creates a TargetServer in the specified environment. // -// - parent: Name of the environment in which to create the resource -// file in the following format: +// - parent: The parent environment name under which the TargetServer +// will be created. Must be of the form // `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsResourcefilesService) Create(parent string, googleapihttpbody *GoogleApiHttpBody) *OrganizationsEnvironmentsResourcefilesCreateCall { - c := &OrganizationsEnvironmentsResourcefilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsEnvironmentsTargetserversService) Create(parent string, googlecloudapigeev1targetserver *GoogleCloudApigeeV1TargetServer) *OrganizationsEnvironmentsTargetserversCreateCall { + c := &OrganizationsEnvironmentsTargetserversCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleapihttpbody = googleapihttpbody + c.googlecloudapigeev1targetserver = googlecloudapigeev1targetserver return c } -// Name sets the optional parameter "name": Required. Name of the -// resource file. Must match the regular expression: -// [a-zA-Z0-9:/\\!@#$%^&{}\\ ()+\-=,.~'` ]{1,255} -func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Name(name string) *OrganizationsEnvironmentsResourcefilesCreateCall { +// Name sets the optional parameter "name": The ID to give the +// TargetServer. This will overwrite the value in TargetServer. +func (c *OrganizationsEnvironmentsTargetserversCreateCall) Name(name string) *OrganizationsEnvironmentsTargetserversCreateCall { c.urlParams_.Set("name", name) return c } -// Type sets the optional parameter "type": Required. Resource file -// type. {{ resource_file_type }} -func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Type(type_ string) *OrganizationsEnvironmentsResourcefilesCreateCall { - 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 *OrganizationsEnvironmentsResourcefilesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesCreateCall { +func (c *OrganizationsEnvironmentsTargetserversCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38080,21 +41955,21 @@ func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Fields(s ...googleapi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesCreateCall { +func (c *OrganizationsEnvironmentsTargetserversCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsTargetserversCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTargetserversCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsResourcefilesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsTargetserversCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -38102,14 +41977,14 @@ func (c *OrganizationsEnvironmentsResourcefilesCreateCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1targetserver) 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, "v1/{+parent}/resourcefiles") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetservers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -38122,14 +41997,14 @@ func (c *OrganizationsEnvironmentsResourcefilesCreateCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.resourcefiles.create" call. -// Exactly one of *GoogleCloudApigeeV1ResourceFile or error will be +// Do executes the "apigee.organizations.environments.targetservers.create" call. +// Exactly one of *GoogleCloudApigeeV1TargetServer or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1ResourceFile.ServerResponse.Header or (if +// either *GoogleCloudApigeeV1TargetServer.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 *OrganizationsEnvironmentsResourcefilesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ResourceFile, error) { +func (c *OrganizationsEnvironmentsTargetserversCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TargetServer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38148,7 +42023,7 @@ func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ResourceFile{ + ret := &GoogleCloudApigeeV1TargetServer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38160,38 +42035,33 @@ func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Creates a resource file. Specify the `Content-Type` as `application/octet-stream` or `multipart/form-data`. For more information about resource files, see [Resource files](https://cloud.google.com/apigee/docs/api-platform/develop/resource-files).", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/resourcefiles", + // "description": "Creates a TargetServer in the specified environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/targetservers", // "httpMethod": "POST", - // "id": "apigee.organizations.environments.resourcefiles.create", + // "id": "apigee.organizations.environments.targetservers.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "name": { - // "description": "Required. Name of the resource file. Must match the regular expression: [a-zA-Z0-9:/\\\\!@#$%^\u0026{}\\[\\]()+\\-=,.~'` ]{1,255}", + // "description": "Optional. The ID to give the TargetServer. This will overwrite the value in TargetServer.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Name of the environment in which to create the resource file in the following format: `organizations/{org}/environments/{env}`.", + // "description": "Required. The parent environment name under which the TargetServer will be created. Must be of the form `organizations/{org}/environments/{env}`.", // "location": "path", // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" - // }, - // "type": { - // "description": "Required. Resource file type. {{ resource_file_type }}", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/resourcefiles", + // "path": "v1/{+parent}/targetservers", // "request": { - // "$ref": "GoogleApiHttpBody" + // "$ref": "GoogleCloudApigeeV1TargetServer" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ResourceFile" + // "$ref": "GoogleCloudApigeeV1TargetServer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -38200,31 +42070,24 @@ func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.resourcefiles.delete": +// method id "apigee.organizations.environments.targetservers.delete": -type OrganizationsEnvironmentsResourcefilesDeleteCall struct { +type OrganizationsEnvironmentsTargetserversDeleteCall struct { s *Service - parent string - type_ string name string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes a resource file. For more information about resource -// files, see Resource files -// (https://cloud.google.com/apigee/docs/api-platform/develop/resource-files). +// Delete: Deletes a TargetServer from an environment. Returns the +// deleted TargetServer resource. // -// - name: ID of the resource file to delete. Must match the regular -// expression: [a-zA-Z0-9:/\\!@#$%^&{}\\ ()+\-=,.~'` ]{1,255}. -// - parent: Name of the environment in the following format: -// `organizations/{org}/environments/{env}`. -// - type: Resource file type. {{ resource_file_type }}. -func (r *OrganizationsEnvironmentsResourcefilesService) Delete(parent string, type_ string, name string) *OrganizationsEnvironmentsResourcefilesDeleteCall { - c := &OrganizationsEnvironmentsResourcefilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.type_ = type_ +// - name: The name of the TargetServer to delete. Must be of the form +// `organizations/{org}/environments/{env}/targetservers/{target_server +// _id}`. +func (r *OrganizationsEnvironmentsTargetserversService) Delete(name string) *OrganizationsEnvironmentsTargetserversDeleteCall { + c := &OrganizationsEnvironmentsTargetserversDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -38232,7 +42095,7 @@ func (r *OrganizationsEnvironmentsResourcefilesService) Delete(parent string, ty // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesDeleteCall { +func (c *OrganizationsEnvironmentsTargetserversDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38240,21 +42103,21 @@ func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) Fields(s ...googleapi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesDeleteCall { +func (c *OrganizationsEnvironmentsTargetserversDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsTargetserversDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTargetserversDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsTargetserversDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -38264,7 +42127,7 @@ func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/resourcefiles/{type}/{name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -38272,21 +42135,19 @@ func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - "type": c.type_, - "name": c.name, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.resourcefiles.delete" call. -// Exactly one of *GoogleCloudApigeeV1ResourceFile or error will be +// Do executes the "apigee.organizations.environments.targetservers.delete" call. +// Exactly one of *GoogleCloudApigeeV1TargetServer or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1ResourceFile.ServerResponse.Header or (if +// either *GoogleCloudApigeeV1TargetServer.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 *OrganizationsEnvironmentsResourcefilesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ResourceFile, error) { +func (c *OrganizationsEnvironmentsTargetserversDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TargetServer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38305,7 +42166,7 @@ func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ResourceFile{ + ret := &GoogleCloudApigeeV1TargetServer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38317,39 +42178,25 @@ func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Deletes a resource file. For more information about resource files, see [Resource files](https://cloud.google.com/apigee/docs/api-platform/develop/resource-files).", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/resourcefiles/{type}/{name}", + // "description": "Deletes a TargetServer from an environment. Returns the deleted TargetServer resource.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/targetservers/{targetserversId}", // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.resourcefiles.delete", + // "id": "apigee.organizations.environments.targetservers.delete", // "parameterOrder": [ - // "parent", - // "type", // "name" // ], // "parameters": { // "name": { - // "description": "Required. ID of the resource file to delete. Must match the regular expression: [a-zA-Z0-9:/\\\\!@#$%^\u0026{}\\[\\]()+\\-=,.~'` ]{1,255}", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "parent": { - // "description": "Required. Name of the environment in the following format: `organizations/{org}/environments/{env}`.", - // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "type": { - // "description": "Required. Resource file type. {{ resource_file_type }}", + // "description": "Required. The name of the TargetServer to delete. Must be of the form `organizations/{org}/environments/{env}/targetservers/{target_server_id}`.", // "location": "path", + // "pattern": "^organizations/[^/]+/environments/[^/]+/targetservers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/resourcefiles/{type}/{name}", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ResourceFile" + // "$ref": "GoogleCloudApigeeV1TargetServer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -38358,12 +42205,10 @@ func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.resourcefiles.get": +// method id "apigee.organizations.environments.targetservers.get": -type OrganizationsEnvironmentsResourcefilesGetCall struct { +type OrganizationsEnvironmentsTargetserversGetCall struct { s *Service - parent string - type_ string name string urlParams_ gensupport.URLParams ifNoneMatch_ string @@ -38371,19 +42216,13 @@ type OrganizationsEnvironmentsResourcefilesGetCall struct { header_ http.Header } -// Get: Gets the contents of a resource file. For more information about -// resource files, see Resource files -// (https://cloud.google.com/apigee/docs/api-platform/develop/resource-files). +// Get: Gets a TargetServer resource. // -// - name: ID of the resource file. Must match the regular expression: -// [a-zA-Z0-9:/\\!@#$%^&{}\\ ()+\-=,.~'` ]{1,255}. -// - parent: Name of the environment in the following format: -// `organizations/{org}/environments/{env}`. -// - type: Resource file type. {{ resource_file_type }}. -func (r *OrganizationsEnvironmentsResourcefilesService) Get(parent string, type_ string, name string) *OrganizationsEnvironmentsResourcefilesGetCall { - c := &OrganizationsEnvironmentsResourcefilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.type_ = type_ +// - name: The name of the TargetServer to get. Must be of the form +// `organizations/{org}/environments/{env}/targetservers/{target_server +// _id}`. +func (r *OrganizationsEnvironmentsTargetserversService) Get(name string) *OrganizationsEnvironmentsTargetserversGetCall { + c := &OrganizationsEnvironmentsTargetserversGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -38391,7 +42230,7 @@ func (r *OrganizationsEnvironmentsResourcefilesService) Get(parent string, type_ // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsResourcefilesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesGetCall { +func (c *OrganizationsEnvironmentsTargetserversGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38401,7 +42240,7 @@ func (c *OrganizationsEnvironmentsResourcefilesGetCall) Fields(s ...googleapi.Fi // 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 *OrganizationsEnvironmentsResourcefilesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsResourcefilesGetCall { +func (c *OrganizationsEnvironmentsTargetserversGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsTargetserversGetCall { c.ifNoneMatch_ = entityTag return c } @@ -38409,21 +42248,21 @@ func (c *OrganizationsEnvironmentsResourcefilesGetCall) IfNoneMatch(entityTag st // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsResourcefilesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesGetCall { +func (c *OrganizationsEnvironmentsTargetserversGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsTargetserversGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsResourcefilesGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTargetserversGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsResourcefilesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsTargetserversGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -38436,7 +42275,7 @@ func (c *OrganizationsEnvironmentsResourcefilesGetCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/resourcefiles/{type}/{name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -38444,21 +42283,19 @@ func (c *OrganizationsEnvironmentsResourcefilesGetCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - "type": c.type_, - "name": c.name, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.resourcefiles.get" call. -// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.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 +// Do executes the "apigee.organizations.environments.targetservers.get" call. +// Exactly one of *GoogleCloudApigeeV1TargetServer or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1TargetServer.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 *OrganizationsEnvironmentsResourcefilesGetCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +func (c *OrganizationsEnvironmentsTargetserversGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TargetServer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38477,7 +42314,7 @@ func (c *OrganizationsEnvironmentsResourcefilesGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleApiHttpBody{ + ret := &GoogleCloudApigeeV1TargetServer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38489,39 +42326,25 @@ func (c *OrganizationsEnvironmentsResourcefilesGetCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Gets the contents of a resource file. For more information about resource files, see [Resource files](https://cloud.google.com/apigee/docs/api-platform/develop/resource-files).", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/resourcefiles/{type}/{name}", + // "description": "Gets a TargetServer resource.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/targetservers/{targetserversId}", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.resourcefiles.get", + // "id": "apigee.organizations.environments.targetservers.get", // "parameterOrder": [ - // "parent", - // "type", // "name" // ], // "parameters": { // "name": { - // "description": "Required. ID of the resource file. Must match the regular expression: [a-zA-Z0-9:/\\\\!@#$%^\u0026{}\\[\\]()+\\-=,.~'` ]{1,255}", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "parent": { - // "description": "Required. Name of the environment in the following format: `organizations/{org}/environments/{env}`.", - // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "type": { - // "description": "Required. Resource file type. {{ resource_file_type }}", + // "description": "Required. The name of the TargetServer to get. Must be of the form `organizations/{org}/environments/{env}/targetservers/{target_server_id}`.", // "location": "path", + // "pattern": "^organizations/[^/]+/environments/[^/]+/targetservers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/resourcefiles/{type}/{name}", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleApiHttpBody" + // "$ref": "GoogleCloudApigeeV1TargetServer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -38530,107 +42353,92 @@ func (c *OrganizationsEnvironmentsResourcefilesGetCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.environments.resourcefiles.list": +// method id "apigee.organizations.environments.targetservers.update": -type OrganizationsEnvironmentsResourcefilesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsTargetserversUpdateCall struct { + s *Service + name string + googlecloudapigeev1targetserver *GoogleCloudApigeeV1TargetServer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all resource files, optionally filtering by type. For -// more information about resource files, see Resource files -// (https://cloud.google.com/apigee/docs/api-platform/develop/resource-files). +// Update: Updates an existing TargetServer. Note that this operation +// has PUT semantics; it will replace the entirety of the existing +// TargetServer with the resource in the request body. // -// - parent: Name of the environment in which to list resource files in -// the following format: `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsResourcefilesService) List(parent string) *OrganizationsEnvironmentsResourcefilesListCall { - c := &OrganizationsEnvironmentsResourcefilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Type sets the optional parameter "type": Type of resource files to -// list. {{ resource_file_type }} -func (c *OrganizationsEnvironmentsResourcefilesListCall) Type(type_ string) *OrganizationsEnvironmentsResourcefilesListCall { - c.urlParams_.Set("type", type_) +// - name: The name of the TargetServer to replace. Must be of the form +// `organizations/{org}/environments/{env}/targetservers/{target_server +// _id}`. +func (r *OrganizationsEnvironmentsTargetserversService) Update(name string, googlecloudapigeev1targetserver *GoogleCloudApigeeV1TargetServer) *OrganizationsEnvironmentsTargetserversUpdateCall { + c := &OrganizationsEnvironmentsTargetserversUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1targetserver = googlecloudapigeev1targetserver return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsResourcefilesListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesListCall { +func (c *OrganizationsEnvironmentsTargetserversUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversUpdateCall { 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 *OrganizationsEnvironmentsResourcefilesListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsResourcefilesListCall { - 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 *OrganizationsEnvironmentsResourcefilesListCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesListCall { +func (c *OrganizationsEnvironmentsTargetserversUpdateCall) Context(ctx context.Context) *OrganizationsEnvironmentsTargetserversUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsResourcefilesListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTargetserversUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsResourcefilesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsTargetserversUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1targetserver) + 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, "v1/{+parent}/resourcefiles") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.resourcefiles.list" call. -// Exactly one of *GoogleCloudApigeeV1ListEnvironmentResourcesResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudApigeeV1ListEnvironmentResourcesResponse.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 *OrganizationsEnvironmentsResourcefilesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListEnvironmentResourcesResponse, error) { +// Do executes the "apigee.organizations.environments.targetservers.update" call. +// Exactly one of *GoogleCloudApigeeV1TargetServer or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1TargetServer.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 *OrganizationsEnvironmentsTargetserversUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TargetServer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38649,7 +42457,7 @@ func (c *OrganizationsEnvironmentsResourcefilesListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListEnvironmentResourcesResponse{ + ret := &GoogleCloudApigeeV1TargetServer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38661,30 +42469,28 @@ func (c *OrganizationsEnvironmentsResourcefilesListCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Lists all resource files, optionally filtering by type. For more information about resource files, see [Resource files](https://cloud.google.com/apigee/docs/api-platform/develop/resource-files).", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/resourcefiles", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.resourcefiles.list", + // "description": "Updates an existing TargetServer. Note that this operation has PUT semantics; it will replace the entirety of the existing TargetServer with the resource in the request body.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/targetservers/{targetserversId}", + // "httpMethod": "PUT", + // "id": "apigee.organizations.environments.targetservers.update", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name of the environment in which to list resource files in the following format: `organizations/{org}/environments/{env}`.", + // "name": { + // "description": "Required. The name of the TargetServer to replace. Must be of the form `organizations/{org}/environments/{env}/targetservers/{target_server_id}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/targetservers/[^/]+$", // "required": true, // "type": "string" - // }, - // "type": { - // "description": "Optional. Type of resource files to list. {{ resource_file_type }}", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/resourcefiles", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1TargetServer" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ListEnvironmentResourcesResponse" + // "$ref": "GoogleCloudApigeeV1TargetServer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -38693,106 +42499,94 @@ func (c *OrganizationsEnvironmentsResourcefilesListCall) Do(opts ...googleapi.Ca } -// method id "apigee.organizations.environments.resourcefiles.listEnvironmentResources": +// method id "apigee.organizations.environments.traceConfig.overrides.create": -type OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall struct { - s *Service - parent string - type_ string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsTraceConfigOverridesCreateCall struct { + s *Service + parent string + googlecloudapigeev1traceconfigoverride *GoogleCloudApigeeV1TraceConfigOverride + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListEnvironmentResources: Lists all resource files, optionally -// filtering by type. For more information about resource files, see -// Resource files -// (https://cloud.google.com/apigee/docs/api-platform/develop/resource-files). +// Create: Creates a trace configuration override. The response contains +// a system-generated UUID, that can be used to view, update, or delete +// the configuration override. Use the List API to view the existing +// trace configuration overrides. // -// - parent: Name of the environment in which to list resource files in -// the following format: `organizations/{org}/environments/{env}`. -// - type: Optional. Type of resource files to list. {{ -// resource_file_type }}. -func (r *OrganizationsEnvironmentsResourcefilesService) ListEnvironmentResources(parent string, type_ string) *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall { - c := &OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent resource of the trace configuration override. Use +// the following structure in your request. +// "organizations/*/environments/*/traceConfig". +func (r *OrganizationsEnvironmentsTraceConfigOverridesService) Create(parent string, googlecloudapigeev1traceconfigoverride *GoogleCloudApigeeV1TraceConfigOverride) *OrganizationsEnvironmentsTraceConfigOverridesCreateCall { + c := &OrganizationsEnvironmentsTraceConfigOverridesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.type_ = type_ + c.googlecloudapigeev1traceconfigoverride = googlecloudapigeev1traceconfigoverride return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall { +func (c *OrganizationsEnvironmentsTraceConfigOverridesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesCreateCall { 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 *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall { - 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 *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall { +func (c *OrganizationsEnvironmentsTraceConfigOverridesCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsTraceConfigOverridesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTraceConfigOverridesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsTraceConfigOverridesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1traceconfigoverride) + 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, "v1/{+parent}/resourcefiles/{type}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/overrides") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "parent": c.parent, - "type": c.type_, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.resourcefiles.listEnvironmentResources" call. -// Exactly one of *GoogleCloudApigeeV1ListEnvironmentResourcesResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudApigeeV1ListEnvironmentResourcesResponse.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 *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListEnvironmentResourcesResponse, error) { +// Do executes the "apigee.organizations.environments.traceConfig.overrides.create" call. +// Exactly one of *GoogleCloudApigeeV1TraceConfigOverride or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudApigeeV1TraceConfigOverride.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 *OrganizationsEnvironmentsTraceConfigOverridesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TraceConfigOverride, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38811,7 +42605,7 @@ func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Do( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListEnvironmentResourcesResponse{ + ret := &GoogleCloudApigeeV1TraceConfigOverride{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38823,32 +42617,28 @@ func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Do( } return ret, nil // { - // "description": "Lists all resource files, optionally filtering by type. For more information about resource files, see [Resource files](https://cloud.google.com/apigee/docs/api-platform/develop/resource-files).", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/resourcefiles/{type}", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.resourcefiles.listEnvironmentResources", + // "description": "Creates a trace configuration override. The response contains a system-generated UUID, that can be used to view, update, or delete the configuration override. Use the List API to view the existing trace configuration overrides.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig/overrides", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.traceConfig.overrides.create", // "parameterOrder": [ - // "parent", - // "type" + // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Name of the environment in which to list resource files in the following format: `organizations/{org}/environments/{env}`.", - // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "type": { - // "description": "Optional. Type of resource files to list. {{ resource_file_type }}", + // "description": "Required. Parent resource of the trace configuration override. Use the following structure in your request. \"organizations/*/environments/*/traceConfig\".", // "location": "path", + // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/resourcefiles/{type}", + // "path": "v1/{+parent}/overrides", + // "request": { + // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ListEnvironmentResourcesResponse" + // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -38857,42 +42647,31 @@ func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Do( } -// method id "apigee.organizations.environments.resourcefiles.update": +// method id "apigee.organizations.environments.traceConfig.overrides.delete": -type OrganizationsEnvironmentsResourcefilesUpdateCall struct { - s *Service - parent string - type_ string - name string - googleapihttpbody *GoogleApiHttpBody - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsTraceConfigOverridesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates a resource file. Specify the `Content-Type` as -// `application/octet-stream` or `multipart/form-data`. For more -// information about resource files, see Resource files -// (https://cloud.google.com/apigee/docs/api-platform/develop/resource-files). +// Delete: Deletes a distributed trace configuration override. // -// - name: ID of the resource file to update. Must match the regular -// expression: [a-zA-Z0-9:/\\!@#$%^&{}\\ ()+\-=,.~'` ]{1,255}. -// - parent: Name of the environment in the following format: -// `organizations/{org}/environments/{env}`. -// - type: Resource file type. {{ resource_file_type }}. -func (r *OrganizationsEnvironmentsResourcefilesService) Update(parent string, type_ string, name string, googleapihttpbody *GoogleApiHttpBody) *OrganizationsEnvironmentsResourcefilesUpdateCall { - c := &OrganizationsEnvironmentsResourcefilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.type_ = type_ +// - name: Name of the trace configuration override. Use the following +// structure in your request: +// "organizations/*/environments/*/traceConfig/overrides/*". +func (r *OrganizationsEnvironmentsTraceConfigOverridesService) Delete(name string) *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall { + c := &OrganizationsEnvironmentsTraceConfigOverridesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleapihttpbody = googleapihttpbody return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesUpdateCall { +func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38900,21 +42679,21 @@ func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) Fields(s ...googleapi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesUpdateCall { +func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -38922,36 +42701,29 @@ func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) - 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, "v1/{+parent}/resourcefiles/{type}/{name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - "type": c.type_, - "name": c.name, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.resourcefiles.update" call. -// Exactly one of *GoogleCloudApigeeV1ResourceFile or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1ResourceFile.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 +// Do executes the "apigee.organizations.environments.traceConfig.overrides.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 *OrganizationsEnvironmentsResourcefilesUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ResourceFile, error) { +func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38970,7 +42742,7 @@ func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ResourceFile{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38982,42 +42754,25 @@ func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Updates a resource file. Specify the `Content-Type` as `application/octet-stream` or `multipart/form-data`. For more information about resource files, see [Resource files](https://cloud.google.com/apigee/docs/api-platform/develop/resource-files).", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/resourcefiles/{type}/{name}", - // "httpMethod": "PUT", - // "id": "apigee.organizations.environments.resourcefiles.update", + // "description": "Deletes a distributed trace configuration override.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig/overrides/{overridesId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.environments.traceConfig.overrides.delete", // "parameterOrder": [ - // "parent", - // "type", // "name" // ], // "parameters": { // "name": { - // "description": "Required. ID of the resource file to update. Must match the regular expression: [a-zA-Z0-9:/\\\\!@#$%^\u0026{}\\[\\]()+\\-=,.~'` ]{1,255}", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "parent": { - // "description": "Required. Name of the environment in the following format: `organizations/{org}/environments/{env}`.", - // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "type": { - // "description": "Required. Resource file type. {{ resource_file_type }}", + // "description": "Required. Name of the trace configuration override. Use the following structure in your request: \"organizations/*/environments/*/traceConfig/overrides/*\".", // "location": "path", + // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig/overrides/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/resourcefiles/{type}/{name}", - // "request": { - // "$ref": "GoogleApiHttpBody" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ResourceFile" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -39026,32 +42781,32 @@ func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.sharedflows.deployments.list": +// method id "apigee.organizations.environments.traceConfig.overrides.get": -type OrganizationsEnvironmentsSharedflowsDeploymentsListCall struct { +type OrganizationsEnvironmentsTraceConfigOverridesGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all deployments of a shared flow in an environment. +// Get: Gets a trace configuration override. // -// - parent: Name representing a shared flow in an environment in the -// following format: -// `organizations/{org}/environments/{env}/sharedflows/{sharedflow}`. -func (r *OrganizationsEnvironmentsSharedflowsDeploymentsService) List(parent string) *OrganizationsEnvironmentsSharedflowsDeploymentsListCall { - c := &OrganizationsEnvironmentsSharedflowsDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Name of the trace configuration override. Use the following +// structure in your request: +// "organizations/*/environments/*/traceConfig/overrides/*". +func (r *OrganizationsEnvironmentsTraceConfigOverridesService) Get(name string) *OrganizationsEnvironmentsTraceConfigOverridesGetCall { + c := &OrganizationsEnvironmentsTraceConfigOverridesGetCall{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 *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSharedflowsDeploymentsListCall { +func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -39061,7 +42816,7 @@ func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Fields(s ...go // 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 *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsSharedflowsDeploymentsListCall { +func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsTraceConfigOverridesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -39069,21 +42824,21 @@ func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) IfNoneMatch(en // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Context(ctx context.Context) *OrganizationsEnvironmentsSharedflowsDeploymentsListCall { +func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsTraceConfigOverridesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -39096,7 +42851,7 @@ func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) doRequest(alt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -39104,21 +42859,20 @@ func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.sharedflows.deployments.list" call. -// Exactly one of *GoogleCloudApigeeV1ListDeploymentsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListDeploymentsResponse.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 *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListDeploymentsResponse, error) { +// Do executes the "apigee.organizations.environments.traceConfig.overrides.get" call. +// Exactly one of *GoogleCloudApigeeV1TraceConfigOverride or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudApigeeV1TraceConfigOverride.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 *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TraceConfigOverride, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39137,7 +42891,7 @@ func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListDeploymentsResponse{ + ret := &GoogleCloudApigeeV1TraceConfigOverride{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39149,25 +42903,25 @@ func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Do(opts ...goo } return ret, nil // { - // "description": "Lists all deployments of a shared flow in an environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/sharedflows/{sharedflowsId}/deployments", + // "description": "Gets a trace configuration override.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig/overrides/{overridesId}", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.sharedflows.deployments.list", + // "id": "apigee.organizations.environments.traceConfig.overrides.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name representing a shared flow in an environment in the following format: `organizations/{org}/environments/{env}/sharedflows/{sharedflow}`", + // "name": { + // "description": "Required. Name of the trace configuration override. Use the following structure in your request: \"organizations/*/environments/*/traceConfig/overrides/*\".", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/sharedflows/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig/overrides/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/deployments", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListDeploymentsResponse" + // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -39176,115 +42930,118 @@ func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Do(opts ...goo } -// method id "apigee.organizations.environments.sharedflows.revisions.deploy": +// method id "apigee.organizations.environments.traceConfig.overrides.list": -type OrganizationsEnvironmentsSharedflowsRevisionsDeployCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsTraceConfigOverridesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Deploy: Deploys a revision of a shared flow. If another revision of -// the same shared flow is currently deployed, set the `override` -// parameter to `true` to have this revision replace the currently -// deployed revision. You cannot use a shared flow until it has been -// deployed to an environment. For a request path -// `organizations/{org}/environments/{env}/sharedflows/{sf}/revisions/{re -// v}/deployments`, two permissions are required: * -// `apigee.deployments.create` on the resource -// `organizations/{org}/environments/{env}` * -// `apigee.sharedflowrevisions.deploy` on the resource -// `organizations/{org}/sharedflows/{sf}/revisions/{rev}` +// List: Lists all of the distributed trace configuration overrides in +// an environment. // -// - name: Name of the shared flow revision to deploy in the following -// format: -// `organizations/{org}/environments/{env}/sharedflows/{sharedflow}/rev -// isions/{rev}`. -func (r *OrganizationsEnvironmentsSharedflowsRevisionsService) Deploy(name string) *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall { - c := &OrganizationsEnvironmentsSharedflowsRevisionsDeployCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Parent resource of the trace configuration override. Use +// the following structure in your request: +// "organizations/*/environments/*/traceConfig". +func (r *OrganizationsEnvironmentsTraceConfigOverridesService) List(parent string) *OrganizationsEnvironmentsTraceConfigOverridesListCall { + c := &OrganizationsEnvironmentsTraceConfigOverridesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Override sets the optional parameter "override": Flag that specifies -// whether the new deployment replaces other deployed revisions of the -// shared flow in the environment. Set `override` to `true` to replace -// other deployed revisions. By default, `override` is `false` and the -// deployment is rejected if other revisions of the shared flow are -// deployed in the environment. -func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Override(override bool) *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall { - c.urlParams_.Set("override", fmt.Sprint(override)) +// PageSize sets the optional parameter "pageSize": Maximum number of +// trace configuration overrides to return. If not specified, the +// maximum number returned is 25. The maximum number cannot exceed 100. +func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) PageSize(pageSize int64) *OrganizationsEnvironmentsTraceConfigOverridesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// ServiceAccount sets the optional parameter "serviceAccount": Google -// Cloud IAM service account. The service account represents the -// identity of the deployed proxy, and determines what permissions it -// has. The format must be -// `{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`. -func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) ServiceAccount(serviceAccount string) *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall { - c.urlParams_.Set("serviceAccount", serviceAccount) +// PageToken sets the optional parameter "pageToken": A page token, +// returned from a previous `ListTraceConfigOverrides` call. Token value +// that can be used to retrieve the subsequent page. When paginating, +// all other parameters provided to `ListTraceConfigOverrides` must +// match those specified in the call to obtain the page token. +func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) PageToken(pageToken string) *OrganizationsEnvironmentsTraceConfigOverridesListCall { + 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 *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall { +func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesListCall { 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 *OrganizationsEnvironmentsTraceConfigOverridesListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsTraceConfigOverridesListCall { + 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 *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Context(ctx context.Context) *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall { +func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) Context(ctx context.Context) *OrganizationsEnvironmentsTraceConfigOverridesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}/deployments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/overrides") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.sharedflows.revisions.deploy" call. -// Exactly one of *GoogleCloudApigeeV1Deployment or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Deployment.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 *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Deployment, error) { +// Do executes the "apigee.organizations.environments.traceConfig.overrides.list" call. +// Exactly one of *GoogleCloudApigeeV1ListTraceConfigOverridesResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudApigeeV1ListTraceConfigOverridesResponse.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 *OrganizationsEnvironmentsTraceConfigOverridesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListTraceConfigOverridesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39303,7 +43060,7 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Deployment{ + ret := &GoogleCloudApigeeV1ListTraceConfigOverridesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39315,35 +43072,36 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Do(opts ...goo } return ret, nil // { - // "description": "Deploys a revision of a shared flow. If another revision of the same shared flow is currently deployed, set the `override` parameter to `true` to have this revision replace the currently deployed revision. You cannot use a shared flow until it has been deployed to an environment. For a request path `organizations/{org}/environments/{env}/sharedflows/{sf}/revisions/{rev}/deployments`, two permissions are required: * `apigee.deployments.create` on the resource `organizations/{org}/environments/{env}` * `apigee.sharedflowrevisions.deploy` on the resource `organizations/{org}/sharedflows/{sf}/revisions/{rev}`", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/sharedflows/{sharedflowsId}/revisions/{revisionsId}/deployments", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.sharedflows.revisions.deploy", + // "description": "Lists all of the distributed trace configuration overrides in an environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig/overrides", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.traceConfig.overrides.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the shared flow revision to deploy in the following format: `organizations/{org}/environments/{env}/sharedflows/{sharedflow}/revisions/{rev}`", - // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/sharedflows/[^/]+/revisions/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "override": { - // "description": "Flag that specifies whether the new deployment replaces other deployed revisions of the shared flow in the environment. Set `override` to `true` to replace other deployed revisions. By default, `override` is `false` and the deployment is rejected if other revisions of the shared flow are deployed in the environment.", + // "pageSize": { + // "description": "Maximum number of trace configuration overrides to return. If not specified, the maximum number returned is 25. The maximum number cannot exceed 100.", + // "format": "int32", // "location": "query", - // "type": "boolean" + // "type": "integer" // }, - // "serviceAccount": { - // "description": "Google Cloud IAM service account. The service account represents the identity of the deployed proxy, and determines what permissions it has. The format must be `{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`.", + // "pageToken": { + // "description": "A page token, returned from a previous `ListTraceConfigOverrides` call. Token value that can be used to retrieve the subsequent page. When paginating, all other parameters provided to `ListTraceConfigOverrides` must match those specified in the call to obtain the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource of the trace configuration override. Use the following structure in your request: \"organizations/*/environments/*/traceConfig\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}/deployments", + // "path": "v1/{+parent}/overrides", // "response": { - // "$ref": "GoogleCloudApigeeV1Deployment" + // "$ref": "GoogleCloudApigeeV1ListTraceConfigOverridesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -39352,81 +43110,103 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Do(opts ...goo } -// method id "apigee.organizations.environments.sharedflows.revisions.getDeployments": +// 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 *OrganizationsEnvironmentsTraceConfigOverridesListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListTraceConfigOverridesResponse) 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) + } +} -type OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "apigee.organizations.environments.traceConfig.overrides.patch": + +type OrganizationsEnvironmentsTraceConfigOverridesPatchCall struct { + s *Service + name string + googlecloudapigeev1traceconfigoverride *GoogleCloudApigeeV1TraceConfigOverride + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetDeployments: Gets the deployment of a shared flow revision and -// actual state reported by runtime pods. +// Patch: Updates a distributed trace configuration override. Note that +// the repeated fields have replace semantics when included in the field +// mask and that they will be overwritten by the value of the fields in +// the request body. // -// - name: Name representing a shared flow in an environment in the -// following format: -// `organizations/{org}/environments/{env}/sharedflows/{sharedflow}/rev -// isions/{rev}`. -func (r *OrganizationsEnvironmentsSharedflowsRevisionsService) GetDeployments(name string) *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall { - c := &OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the trace configuration override. Use the following +// structure in your request: +// "organizations/*/environments/*/traceConfig/overrides/*". +func (r *OrganizationsEnvironmentsTraceConfigOverridesService) Patch(name string, googlecloudapigeev1traceconfigoverride *GoogleCloudApigeeV1TraceConfigOverride) *OrganizationsEnvironmentsTraceConfigOverridesPatchCall { + c := &OrganizationsEnvironmentsTraceConfigOverridesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudapigeev1traceconfigoverride = googlecloudapigeev1traceconfigoverride + return c +} + +// UpdateMask sets the optional parameter "updateMask": List of fields +// to be updated. +func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) UpdateMask(updateMask string) *OrganizationsEnvironmentsTraceConfigOverridesPatchCall { + 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 *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall { +func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesPatchCall { 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 *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall { - 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 *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Context(ctx context.Context) *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall { +func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Context(ctx context.Context) *OrganizationsEnvironmentsTraceConfigOverridesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1traceconfigoverride) + 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, "v1/{+name}/deployments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -39437,14 +43217,15 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.sharedflows.revisions.getDeployments" call. -// Exactly one of *GoogleCloudApigeeV1Deployment or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1Deployment.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 +// Do executes the "apigee.organizations.environments.traceConfig.overrides.patch" call. +// Exactly one of *GoogleCloudApigeeV1TraceConfigOverride or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudApigeeV1TraceConfigOverride.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 *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Deployment, error) { +func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TraceConfigOverride, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39463,7 +43244,7 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Deployment{ + ret := &GoogleCloudApigeeV1TraceConfigOverride{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39475,25 +43256,34 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Do(opt } return ret, nil // { - // "description": "Gets the deployment of a shared flow revision and actual state reported by runtime pods.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/sharedflows/{sharedflowsId}/revisions/{revisionsId}/deployments", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.sharedflows.revisions.getDeployments", + // "description": "Updates a distributed trace configuration override. Note that the repeated fields have replace semantics when included in the field mask and that they will be overwritten by the value of the fields in the request body.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig/overrides/{overridesId}", + // "httpMethod": "PATCH", + // "id": "apigee.organizations.environments.traceConfig.overrides.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name representing a shared flow in an environment in the following format: `organizations/{org}/environments/{env}/sharedflows/{sharedflow}/revisions/{rev}`", + // "description": "Required. Name of the trace configuration override. Use the following structure in your request: \"organizations/*/environments/*/traceConfig/overrides/*\".", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/sharedflows/[^/]+/revisions/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig/overrides/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "List of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}/deployments", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Deployment" + // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -39502,39 +43292,36 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Do(opt } -// method id "apigee.organizations.environments.sharedflows.revisions.undeploy": +// method id "apigee.organizations.hostQueries.create": -type OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsHostQueriesCreateCall struct { + s *Service + parent string + googlecloudapigeev1query *GoogleCloudApigeeV1Query + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Undeploy: Undeploys a shared flow revision from an environment. For a -// request path -// `organizations/{org}/environments/{env}/sharedflows/{sf}/revisions/{re -// v}/deployments`, two permissions are required: * -// `apigee.deployments.delete` on the resource -// `organizations/{org}/environments/{env}` * -// `apigee.sharedflowrevisions.undeploy` on the resource -// `organizations/{org}/sharedflows/{sf}/revisions/{rev}` +// Create: Submit a query at host level to be processed in the +// background. If the submission of the query succeeds, the API returns +// a 201 status and an ID that refer to the query. In addition to the +// HTTP status 201, the `state` of "enqueued" means that the request +// succeeded. // -// - name: Name of the shared flow revision to undeploy in the following -// format: -// `organizations/{org}/environments/{env}/sharedflows/{sharedflow}/rev -// isions/{rev}`. -func (r *OrganizationsEnvironmentsSharedflowsRevisionsService) Undeploy(name string) *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall { - c := &OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name. Must be of the form +// `organizations/{org}`. +func (r *OrganizationsHostQueriesService) Create(parent string, googlecloudapigeev1query *GoogleCloudApigeeV1Query) *OrganizationsHostQueriesCreateCall { + c := &OrganizationsHostQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1query = googlecloudapigeev1query return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall { +func (c *OrganizationsHostQueriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsHostQueriesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -39542,21 +43329,21 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Fields(s ... // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Context(ctx context.Context) *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall { +func (c *OrganizationsHostQueriesCreateCall) Context(ctx context.Context) *OrganizationsHostQueriesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Header() http.Header { +func (c *OrganizationsHostQueriesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsHostQueriesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -39564,29 +43351,34 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) doRequest(al } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1query) + 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, "v1/{+name}/deployments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hostQueries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.sharedflows.revisions.undeploy" 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 +// Do executes the "apigee.organizations.hostQueries.create" call. +// Exactly one of *GoogleCloudApigeeV1AsyncQuery or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1AsyncQuery.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 *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsHostQueriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQuery, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39605,7 +43397,7 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudApigeeV1AsyncQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39617,25 +43409,28 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Do(opts ...g } return ret, nil // { - // "description": "Undeploys a shared flow revision from an environment. For a request path `organizations/{org}/environments/{env}/sharedflows/{sf}/revisions/{rev}/deployments`, two permissions are required: * `apigee.deployments.delete` on the resource `organizations/{org}/environments/{env}` * `apigee.sharedflowrevisions.undeploy` on the resource `organizations/{org}/sharedflows/{sf}/revisions/{rev}`", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/sharedflows/{sharedflowsId}/revisions/{revisionsId}/deployments", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.sharedflows.revisions.undeploy", + // "description": "Submit a query at host level to be processed in the background. If the submission of the query succeeds, the API returns a 201 status and an ID that refer to the query. In addition to the HTTP status 201, the `state` of \"enqueued\" means that the request succeeded.", + // "flatPath": "v1/organizations/{organizationsId}/hostQueries", + // "httpMethod": "POST", + // "id": "apigee.organizations.hostQueries.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the shared flow revision to undeploy in the following format: `organizations/{org}/environments/{env}/sharedflows/{sharedflow}/revisions/{rev}`", + // "parent": { + // "description": "Required. The parent resource name. Must be of the form `organizations/{org}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/sharedflows/[^/]+/revisions/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}/deployments", + // "path": "v1/{+parent}/hostQueries", + // "request": { + // "$ref": "GoogleCloudApigeeV1Query" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudApigeeV1AsyncQuery" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -39644,9 +43439,9 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Do(opts ...g } -// method id "apigee.organizations.environments.stats.get": +// method id "apigee.organizations.hostQueries.get": -type OrganizationsEnvironmentsStatsGetCall struct { +type OrganizationsHostQueriesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -39655,144 +43450,22 @@ type OrganizationsEnvironmentsStatsGetCall struct { header_ http.Header } -// Get: Retrieve metrics grouped by dimensions. The types of metrics you -// can retrieve include traffic, message counts, API call latency, -// response size, and cache hits and counts. Dimensions let you view -// metrics in meaningful groups. You can optionally pass dimensions as -// path parameters to the `stats` API. If dimensions are not specified, -// the metrics are computed on the entire set of data for the given time -// range. +// Get: Get status of a query submitted at host level. If the query is +// still in progress, the `state` is set to "running" After the query +// has completed successfully, `state` is set to "completed" // -// - name: Resource name for which the interactive query will be -// executed. Use the following format in your request: -// `organizations/{org}/environments/{env}/stats/{dimensions}` -// Dimensions let you view metrics in meaningful groupings, such as -// `apiproxy` or `target_host`. The value of dimensions should be a -// comma-separated list, as shown below: -// `organizations/{org}/environments/{env}/stats/apiproxy,request_verb`. -func (r *OrganizationsEnvironmentsStatsService) Get(name string) *OrganizationsEnvironmentsStatsGetCall { - c := &OrganizationsEnvironmentsStatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Accuracy sets the optional parameter "accuracy": No longer used by -// Apigee. Supported for backwards compatibility. -func (c *OrganizationsEnvironmentsStatsGetCall) Accuracy(accuracy string) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("accuracy", accuracy) - return c -} - -// AggTable sets the optional parameter "aggTable": Table name used to -// query custom aggregate tables. If this parameter is skipped, then -// Apigee will try to retrieve the data from fact tables which will be -// expensive. -func (c *OrganizationsEnvironmentsStatsGetCall) AggTable(aggTable string) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("aggTable", aggTable) - return c -} - -// Filter sets the optional parameter "filter": Filter that enables you -// to drill down on specific dimension values. -func (c *OrganizationsEnvironmentsStatsGetCall) Filter(filter string) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("filter", filter) - return c -} - -// Limit sets the optional parameter "limit": Maximum number of result -// items to return. The default and maximum value that can be returned -// is 14400. -func (c *OrganizationsEnvironmentsStatsGetCall) Limit(limit string) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("limit", limit) - return c -} - -// Offset sets the optional parameter "offset": Offset value. Use -// `offset` with `limit` to enable pagination of results. For example, -// to display results 11-20, set limit to `10` and offset to `10`. -func (c *OrganizationsEnvironmentsStatsGetCall) Offset(offset string) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("offset", offset) - return c -} - -// Realtime sets the optional parameter "realtime": No longer used by -// Apigee. Supported for backwards compatibility. -func (c *OrganizationsEnvironmentsStatsGetCall) Realtime(realtime bool) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("realtime", fmt.Sprint(realtime)) - return c -} - -// Select sets the optional parameter "select": Comma-separated list of -// metrics. For example: `sum(message_count),sum(error_count)` -func (c *OrganizationsEnvironmentsStatsGetCall) Select(select_ string) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("select", select_) - return c -} - -// Sonar sets the optional parameter "sonar": Routes the query to API -// Monitoring for the last hour. -func (c *OrganizationsEnvironmentsStatsGetCall) Sonar(sonar bool) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("sonar", fmt.Sprint(sonar)) - return c -} - -// Sort sets the optional parameter "sort": Flag that specifies whether -// the sort order should be ascending or descending. Valid values -// include: `DESC` and `ASC`. -func (c *OrganizationsEnvironmentsStatsGetCall) Sort(sort string) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("sort", sort) - return c -} - -// Sortby sets the optional parameter "sortby": Comma-separated list of -// columns to sort the final result. -func (c *OrganizationsEnvironmentsStatsGetCall) Sortby(sortby string) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("sortby", sortby) - return c -} - -// TimeRange sets the optional parameter "timeRange": Time interval for -// the interactive query. Time range is specified in GMT as `start~end`. -// For example: `04/15/2017 00:00~05/15/2017 23:59` -func (c *OrganizationsEnvironmentsStatsGetCall) TimeRange(timeRange string) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("timeRange", timeRange) - return c -} - -// TimeUnit sets the optional parameter "timeUnit": Granularity of -// metrics returned. Valid values include: `second`, `minute`, `hour`, -// `day`, `week`, or` month`. -func (c *OrganizationsEnvironmentsStatsGetCall) TimeUnit(timeUnit string) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("timeUnit", timeUnit) - return c -} - -// Topk sets the optional parameter "topk": Top number of results to -// return. For example, to return the top 5 results, set `topk=5`. -func (c *OrganizationsEnvironmentsStatsGetCall) Topk(topk string) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("topk", topk) - return c -} - -// TsAscending sets the optional parameter "tsAscending": Flag that -// specifies whether to list timestamps in ascending (`true`) or -// descending (`false`) order. Apigee recommends that you set this value -// to `true` if you are using `sortby` with `sort=DESC`. -func (c *OrganizationsEnvironmentsStatsGetCall) TsAscending(tsAscending bool) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("tsAscending", fmt.Sprint(tsAscending)) - return c -} - -// Tzo sets the optional parameter "tzo": Timezone offset value. -func (c *OrganizationsEnvironmentsStatsGetCall) Tzo(tzo string) *OrganizationsEnvironmentsStatsGetCall { - c.urlParams_.Set("tzo", tzo) +// - name: Name of the asynchronous query to get. Must be of the form +// `organizations/{org}/queries/{queryId}`. +func (r *OrganizationsHostQueriesService) Get(name string) *OrganizationsHostQueriesGetCall { + c := &OrganizationsHostQueriesGetCall{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 *OrganizationsEnvironmentsStatsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsStatsGetCall { +func (c *OrganizationsHostQueriesGetCall) Fields(s ...googleapi.Field) *OrganizationsHostQueriesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -39802,7 +43475,7 @@ func (c *OrganizationsEnvironmentsStatsGetCall) Fields(s ...googleapi.Field) *Or // 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 *OrganizationsEnvironmentsStatsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsStatsGetCall { +func (c *OrganizationsHostQueriesGetCall) IfNoneMatch(entityTag string) *OrganizationsHostQueriesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -39810,21 +43483,21 @@ func (c *OrganizationsEnvironmentsStatsGetCall) IfNoneMatch(entityTag string) *O // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsStatsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsStatsGetCall { +func (c *OrganizationsHostQueriesGetCall) Context(ctx context.Context) *OrganizationsHostQueriesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsStatsGetCall) Header() http.Header { +func (c *OrganizationsHostQueriesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsStatsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsHostQueriesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -39850,14 +43523,14 @@ func (c *OrganizationsEnvironmentsStatsGetCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.stats.get" call. -// Exactly one of *GoogleCloudApigeeV1Stats or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1Stats.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.hostQueries.get" call. +// Exactly one of *GoogleCloudApigeeV1AsyncQuery or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1AsyncQuery.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 *OrganizationsEnvironmentsStatsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Stats, error) { +func (c *OrganizationsHostQueriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQuery, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39876,7 +43549,7 @@ func (c *OrganizationsEnvironmentsStatsGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Stats{ + ret := &GoogleCloudApigeeV1AsyncQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39888,100 +43561,25 @@ func (c *OrganizationsEnvironmentsStatsGetCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Retrieve metrics grouped by dimensions. The types of metrics you can retrieve include traffic, message counts, API call latency, response size, and cache hits and counts. Dimensions let you view metrics in meaningful groups. You can optionally pass dimensions as path parameters to the `stats` API. If dimensions are not specified, the metrics are computed on the entire set of data for the given time range.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/stats/{statsId}", + // "description": "Get status of a query submitted at host level. If the query is still in progress, the `state` is set to \"running\" After the query has completed successfully, `state` is set to \"completed\"", + // "flatPath": "v1/organizations/{organizationsId}/hostQueries/{hostQueriesId}", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.stats.get", + // "id": "apigee.organizations.hostQueries.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "accuracy": { - // "description": "No longer used by Apigee. Supported for backwards compatibility.", - // "location": "query", - // "type": "string" - // }, - // "aggTable": { - // "description": "Table name used to query custom aggregate tables. If this parameter is skipped, then Apigee will try to retrieve the data from fact tables which will be expensive.", - // "location": "query", - // "type": "string" - // }, - // "filter": { - // "description": "Filter that enables you to drill down on specific dimension values.", - // "location": "query", - // "type": "string" - // }, - // "limit": { - // "description": "Maximum number of result items to return. The default and maximum value that can be returned is 14400.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "Required. Resource name for which the interactive query will be executed. Use the following format in your request: `organizations/{org}/environments/{env}/stats/{dimensions}` Dimensions let you view metrics in meaningful groupings, such as `apiproxy` or `target_host`. The value of dimensions should be a comma-separated list, as shown below: `organizations/{org}/environments/{env}/stats/apiproxy,request_verb`", + // "description": "Required. Name of the asynchronous query to get. Must be of the form `organizations/{org}/queries/{queryId}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/stats/.*$", + // "pattern": "^organizations/[^/]+/hostQueries/[^/]+$", // "required": true, // "type": "string" - // }, - // "offset": { - // "description": "Offset value. Use `offset` with `limit` to enable pagination of results. For example, to display results 11-20, set limit to `10` and offset to `10`.", - // "location": "query", - // "type": "string" - // }, - // "realtime": { - // "description": "No longer used by Apigee. Supported for backwards compatibility.", - // "location": "query", - // "type": "boolean" - // }, - // "select": { - // "description": "Comma-separated list of metrics. For example: `sum(message_count),sum(error_count)`", - // "location": "query", - // "type": "string" - // }, - // "sonar": { - // "description": "Routes the query to API Monitoring for the last hour.", - // "location": "query", - // "type": "boolean" - // }, - // "sort": { - // "description": "Flag that specifies whether the sort order should be ascending or descending. Valid values include: `DESC` and `ASC`.", - // "location": "query", - // "type": "string" - // }, - // "sortby": { - // "description": "Comma-separated list of columns to sort the final result.", - // "location": "query", - // "type": "string" - // }, - // "timeRange": { - // "description": "Time interval for the interactive query. Time range is specified in GMT as `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59`", - // "location": "query", - // "type": "string" - // }, - // "timeUnit": { - // "description": "Granularity of metrics returned. Valid values include: `second`, `minute`, `hour`, `day`, `week`, or` month`.", - // "location": "query", - // "type": "string" - // }, - // "topk": { - // "description": "Top number of results to return. For example, to return the top 5 results, set `topk=5`.", - // "location": "query", - // "type": "string" - // }, - // "tsAscending": { - // "description": "Flag that specifies whether to list timestamps in ascending (`true`) or descending (`false`) order. Apigee recommends that you set this value to `true` if you are using `sortby` with `sort=DESC`.", - // "location": "query", - // "type": "boolean" - // }, - // "tzo": { - // "description": "Timezone offset value.", - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Stats" + // "$ref": "GoogleCloudApigeeV1AsyncQuery" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -39990,97 +43588,100 @@ func (c *OrganizationsEnvironmentsStatsGetCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.environments.targetservers.create": +// method id "apigee.organizations.hostQueries.getResult": -type OrganizationsEnvironmentsTargetserversCreateCall struct { - s *Service - parent string - googlecloudapigeev1targetserver *GoogleCloudApigeeV1TargetServer - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsHostQueriesGetResultCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a TargetServer in the specified environment. +// GetResult: After the query is completed, use this API to retrieve the +// results. If the request succeeds, and there is a non-zero result set, +// the result is downloaded to the client as a zipped JSON file. The +// name of the downloaded file will be: OfflineQueryResult-.zip Example: +// `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip` // -// - parent: The parent environment name under which the TargetServer -// will be created. Must be of the form -// `organizations/{org}/environments/{env}`. -func (r *OrganizationsEnvironmentsTargetserversService) Create(parent string, googlecloudapigeev1targetserver *GoogleCloudApigeeV1TargetServer) *OrganizationsEnvironmentsTargetserversCreateCall { - c := &OrganizationsEnvironmentsTargetserversCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1targetserver = googlecloudapigeev1targetserver - return c -} - -// Name sets the optional parameter "name": The ID to give the -// TargetServer. This will overwrite the value in TargetServer. -func (c *OrganizationsEnvironmentsTargetserversCreateCall) Name(name string) *OrganizationsEnvironmentsTargetserversCreateCall { - c.urlParams_.Set("name", name) +// - name: Name of the asynchronous query result to get. Must be of the +// form `organizations/{org}/queries/{queryId}/result`. +func (r *OrganizationsHostQueriesService) GetResult(name string) *OrganizationsHostQueriesGetResultCall { + c := &OrganizationsHostQueriesGetResultCall{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 *OrganizationsEnvironmentsTargetserversCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversCreateCall { +func (c *OrganizationsHostQueriesGetResultCall) Fields(s ...googleapi.Field) *OrganizationsHostQueriesGetResultCall { 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 *OrganizationsHostQueriesGetResultCall) IfNoneMatch(entityTag string) *OrganizationsHostQueriesGetResultCall { + 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 *OrganizationsEnvironmentsTargetserversCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsTargetserversCreateCall { +func (c *OrganizationsHostQueriesGetResultCall) Context(ctx context.Context) *OrganizationsHostQueriesGetResultCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsTargetserversCreateCall) Header() http.Header { +func (c *OrganizationsHostQueriesGetResultCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsTargetserversCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsHostQueriesGetResultCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1targetserver) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetservers") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.targetservers.create" call. -// Exactly one of *GoogleCloudApigeeV1TargetServer or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1TargetServer.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 +// Do executes the "apigee.organizations.hostQueries.getResult" call. +// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.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 *OrganizationsEnvironmentsTargetserversCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TargetServer, error) { +func (c *OrganizationsHostQueriesGetResultCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40099,7 +43700,7 @@ func (c *OrganizationsEnvironmentsTargetserversCreateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1TargetServer{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40111,33 +43712,25 @@ func (c *OrganizationsEnvironmentsTargetserversCreateCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Creates a TargetServer in the specified environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/targetservers", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.targetservers.create", + // "description": "After the query is completed, use this API to retrieve the results. If the request succeeds, and there is a non-zero result set, the result is downloaded to the client as a zipped JSON file. The name of the downloaded file will be: OfflineQueryResult-.zip Example: `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip`", + // "flatPath": "v1/organizations/{organizationsId}/hostQueries/{hostQueriesId}/result", + // "httpMethod": "GET", + // "id": "apigee.organizations.hostQueries.getResult", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { // "name": { - // "description": "Optional. The ID to give the TargetServer. This will overwrite the value in TargetServer.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent environment name under which the TargetServer will be created. Must be of the form `organizations/{org}/environments/{env}`.", + // "description": "Required. Name of the asynchronous query result to get. Must be of the form `organizations/{org}/queries/{queryId}/result`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/hostQueries/[^/]+/result$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/targetservers", - // "request": { - // "$ref": "GoogleCloudApigeeV1TargetServer" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1TargetServer" + // "$ref": "GoogleApiHttpBody" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -40146,24 +43739,23 @@ func (c *OrganizationsEnvironmentsTargetserversCreateCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.targetservers.delete": +// method id "apigee.organizations.hostQueries.getResultView": -type OrganizationsEnvironmentsTargetserversDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsHostQueriesGetResultViewCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a TargetServer from an environment. Returns the -// deleted TargetServer resource. +// GetResultView: // -// - name: The name of the TargetServer to delete. Must be of the form -// `organizations/{org}/environments/{env}/targetservers/{target_server -// _id}`. -func (r *OrganizationsEnvironmentsTargetserversService) Delete(name string) *OrganizationsEnvironmentsTargetserversDeleteCall { - c := &OrganizationsEnvironmentsTargetserversDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the asynchronous query result view to get. Must be of +// the form `organizations/{org}/queries/{queryId}/resultView`. +func (r *OrganizationsHostQueriesService) GetResultView(name string) *OrganizationsHostQueriesGetResultViewCall { + c := &OrganizationsHostQueriesGetResultViewCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -40171,41 +43763,54 @@ func (r *OrganizationsEnvironmentsTargetserversService) Delete(name string) *Org // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsTargetserversDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversDeleteCall { +func (c *OrganizationsHostQueriesGetResultViewCall) Fields(s ...googleapi.Field) *OrganizationsHostQueriesGetResultViewCall { 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 *OrganizationsHostQueriesGetResultViewCall) IfNoneMatch(entityTag string) *OrganizationsHostQueriesGetResultViewCall { + 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 *OrganizationsEnvironmentsTargetserversDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsTargetserversDeleteCall { +func (c *OrganizationsHostQueriesGetResultViewCall) Context(ctx context.Context) *OrganizationsHostQueriesGetResultViewCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsTargetserversDeleteCall) Header() http.Header { +func (c *OrganizationsHostQueriesGetResultViewCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsTargetserversDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsHostQueriesGetResultViewCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -40216,14 +43821,15 @@ func (c *OrganizationsEnvironmentsTargetserversDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.targetservers.delete" call. -// Exactly one of *GoogleCloudApigeeV1TargetServer or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1TargetServer.ServerResponse.Header or (if +// Do executes the "apigee.organizations.hostQueries.getResultView" call. +// Exactly one of *GoogleCloudApigeeV1AsyncQueryResultView or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudApigeeV1AsyncQueryResultView.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 *OrganizationsEnvironmentsTargetserversDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TargetServer, error) { +func (c *OrganizationsHostQueriesGetResultViewCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQueryResultView, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40242,7 +43848,7 @@ func (c *OrganizationsEnvironmentsTargetserversDeleteCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1TargetServer{ + ret := &GoogleCloudApigeeV1AsyncQueryResultView{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40254,25 +43860,25 @@ func (c *OrganizationsEnvironmentsTargetserversDeleteCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Deletes a TargetServer from an environment. Returns the deleted TargetServer resource.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/targetservers/{targetserversId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.targetservers.delete", + // "description": "", + // "flatPath": "v1/organizations/{organizationsId}/hostQueries/{hostQueriesId}/resultView", + // "httpMethod": "GET", + // "id": "apigee.organizations.hostQueries.getResultView", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the TargetServer to delete. Must be of the form `organizations/{org}/environments/{env}/targetservers/{target_server_id}`.", + // "description": "Required. Name of the asynchronous query result view to get. Must be of the form `organizations/{org}/queries/{queryId}/resultView`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/targetservers/[^/]+$", + // "pattern": "^organizations/[^/]+/hostQueries/[^/]+/resultView$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1TargetServer" + // "$ref": "GoogleCloudApigeeV1AsyncQueryResultView" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -40281,32 +43887,83 @@ func (c *OrganizationsEnvironmentsTargetserversDeleteCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.targetservers.get": +// method id "apigee.organizations.hostQueries.list": -type OrganizationsEnvironmentsTargetserversGetCall struct { +type OrganizationsHostQueriesListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets a TargetServer resource. +// List: Return a list of Asynchronous Queries at host level. // -// - name: The name of the TargetServer to get. Must be of the form -// `organizations/{org}/environments/{env}/targetservers/{target_server -// _id}`. -func (r *OrganizationsEnvironmentsTargetserversService) Get(name string) *OrganizationsEnvironmentsTargetserversGetCall { - c := &OrganizationsEnvironmentsTargetserversGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name. Must be of the form +// `organizations/{org}`. +func (r *OrganizationsHostQueriesService) List(parent string) *OrganizationsHostQueriesListCall { + c := &OrganizationsHostQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Dataset sets the optional parameter "dataset": Filter response list +// by dataset. Example: `api`, `mint` +func (c *OrganizationsHostQueriesListCall) Dataset(dataset string) *OrganizationsHostQueriesListCall { + c.urlParams_.Set("dataset", dataset) + return c +} + +// EnvgroupHostname sets the optional parameter "envgroupHostname": +// Required. Filter response list by hostname. +func (c *OrganizationsHostQueriesListCall) EnvgroupHostname(envgroupHostname string) *OrganizationsHostQueriesListCall { + c.urlParams_.Set("envgroupHostname", envgroupHostname) + return c +} + +// From sets the optional parameter "from": Filter response list by +// returning asynchronous queries that created after this date time. +// Time must be in ISO date-time format like '2011-12-03T10:15:30Z'. +func (c *OrganizationsHostQueriesListCall) From(from string) *OrganizationsHostQueriesListCall { + c.urlParams_.Set("from", from) + return c +} + +// InclQueriesWithoutReport sets the optional parameter +// "inclQueriesWithoutReport": Flag to include asynchronous queries that +// don't have a report denifition. +func (c *OrganizationsHostQueriesListCall) InclQueriesWithoutReport(inclQueriesWithoutReport string) *OrganizationsHostQueriesListCall { + c.urlParams_.Set("inclQueriesWithoutReport", inclQueriesWithoutReport) + return c +} + +// Status sets the optional parameter "status": Filter response list by +// asynchronous query status. +func (c *OrganizationsHostQueriesListCall) Status(status string) *OrganizationsHostQueriesListCall { + c.urlParams_.Set("status", status) + return c +} + +// SubmittedBy sets the optional parameter "submittedBy": Filter +// response list by user who submitted queries. +func (c *OrganizationsHostQueriesListCall) SubmittedBy(submittedBy string) *OrganizationsHostQueriesListCall { + c.urlParams_.Set("submittedBy", submittedBy) + return c +} + +// To sets the optional parameter "to": Filter response list by +// returning asynchronous queries that created before this date time. +// Time must be in ISO date-time format like '2011-12-03T10:16:30Z'. +func (c *OrganizationsHostQueriesListCall) To(to string) *OrganizationsHostQueriesListCall { + c.urlParams_.Set("to", to) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsTargetserversGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversGetCall { +func (c *OrganizationsHostQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsHostQueriesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -40316,7 +43973,7 @@ func (c *OrganizationsEnvironmentsTargetserversGetCall) Fields(s ...googleapi.Fi // 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 *OrganizationsEnvironmentsTargetserversGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsTargetserversGetCall { +func (c *OrganizationsHostQueriesListCall) IfNoneMatch(entityTag string) *OrganizationsHostQueriesListCall { c.ifNoneMatch_ = entityTag return c } @@ -40324,21 +43981,21 @@ func (c *OrganizationsEnvironmentsTargetserversGetCall) IfNoneMatch(entityTag st // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsTargetserversGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsTargetserversGetCall { +func (c *OrganizationsHostQueriesListCall) Context(ctx context.Context) *OrganizationsHostQueriesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsTargetserversGetCall) Header() http.Header { +func (c *OrganizationsHostQueriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsTargetserversGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsHostQueriesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -40351,7 +44008,7 @@ func (c *OrganizationsEnvironmentsTargetserversGetCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hostQueries") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -40359,19 +44016,21 @@ func (c *OrganizationsEnvironmentsTargetserversGetCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.targetservers.get" call. -// Exactly one of *GoogleCloudApigeeV1TargetServer or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1TargetServer.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 *OrganizationsEnvironmentsTargetserversGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TargetServer, error) { +// Do executes the "apigee.organizations.hostQueries.list" call. +// Exactly one of *GoogleCloudApigeeV1ListAsyncQueriesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListAsyncQueriesResponse.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 *OrganizationsHostQueriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListAsyncQueriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40390,7 +44049,7 @@ func (c *OrganizationsEnvironmentsTargetserversGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1TargetServer{ + ret := &GoogleCloudApigeeV1ListAsyncQueriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40402,25 +44061,60 @@ func (c *OrganizationsEnvironmentsTargetserversGetCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Gets a TargetServer resource.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/targetservers/{targetserversId}", + // "description": "Return a list of Asynchronous Queries at host level.", + // "flatPath": "v1/organizations/{organizationsId}/hostQueries", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.targetservers.get", + // "id": "apigee.organizations.hostQueries.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the TargetServer to get. Must be of the form `organizations/{org}/environments/{env}/targetservers/{target_server_id}`.", + // "dataset": { + // "description": "Filter response list by dataset. Example: `api`, `mint`", + // "location": "query", + // "type": "string" + // }, + // "envgroupHostname": { + // "description": "Required. Filter response list by hostname.", + // "location": "query", + // "type": "string" + // }, + // "from": { + // "description": "Filter response list by returning asynchronous queries that created after this date time. Time must be in ISO date-time format like '2011-12-03T10:15:30Z'.", + // "location": "query", + // "type": "string" + // }, + // "inclQueriesWithoutReport": { + // "description": "Flag to include asynchronous queries that don't have a report denifition.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name. Must be of the form `organizations/{org}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/targetservers/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" + // }, + // "status": { + // "description": "Filter response list by asynchronous query status.", + // "location": "query", + // "type": "string" + // }, + // "submittedBy": { + // "description": "Filter response list by user who submitted queries.", + // "location": "query", + // "type": "string" + // }, + // "to": { + // "description": "Filter response list by returning asynchronous queries that created before this date time. Time must be in ISO date-time format like '2011-12-03T10:16:30Z'.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/hostQueries", // "response": { - // "$ref": "GoogleCloudApigeeV1TargetServer" + // "$ref": "GoogleCloudApigeeV1ListAsyncQueriesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -40429,35 +44123,36 @@ func (c *OrganizationsEnvironmentsTargetserversGetCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.environments.targetservers.update": +// method id "apigee.organizations.hostSecurityReports.create": -type OrganizationsEnvironmentsTargetserversUpdateCall struct { - s *Service - name string - googlecloudapigeev1targetserver *GoogleCloudApigeeV1TargetServer - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsHostSecurityReportsCreateCall struct { + s *Service + parent string + googlecloudapigeev1securityreportquery *GoogleCloudApigeeV1SecurityReportQuery + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates an existing TargetServer. Note that this operation -// has PUT semantics; it will replace the entirety of the existing -// TargetServer with the resource in the request body. +// Create: Submit a query at host level to be processed in the +// background. If the submission of the query succeeds, the API returns +// a 201 status and an ID that refer to the query. In addition to the +// HTTP status 201, the `state` of "enqueued" means that the request +// succeeded. // -// - name: The name of the TargetServer to replace. Must be of the form -// `organizations/{org}/environments/{env}/targetservers/{target_server -// _id}`. -func (r *OrganizationsEnvironmentsTargetserversService) Update(name string, googlecloudapigeev1targetserver *GoogleCloudApigeeV1TargetServer) *OrganizationsEnvironmentsTargetserversUpdateCall { - c := &OrganizationsEnvironmentsTargetserversUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1targetserver = googlecloudapigeev1targetserver +// - parent: The parent resource name. Must be of the form +// `organizations/{org}`. +func (r *OrganizationsHostSecurityReportsService) Create(parent string, googlecloudapigeev1securityreportquery *GoogleCloudApigeeV1SecurityReportQuery) *OrganizationsHostSecurityReportsCreateCall { + c := &OrganizationsHostSecurityReportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1securityreportquery = googlecloudapigeev1securityreportquery return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsTargetserversUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversUpdateCall { +func (c *OrganizationsHostSecurityReportsCreateCall) Fields(s ...googleapi.Field) *OrganizationsHostSecurityReportsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -40465,21 +44160,21 @@ func (c *OrganizationsEnvironmentsTargetserversUpdateCall) Fields(s ...googleapi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsTargetserversUpdateCall) Context(ctx context.Context) *OrganizationsEnvironmentsTargetserversUpdateCall { +func (c *OrganizationsHostSecurityReportsCreateCall) Context(ctx context.Context) *OrganizationsHostSecurityReportsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsTargetserversUpdateCall) Header() http.Header { +func (c *OrganizationsHostSecurityReportsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsTargetserversUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsHostSecurityReportsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -40487,34 +44182,35 @@ func (c *OrganizationsEnvironmentsTargetserversUpdateCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1targetserver) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1securityreportquery) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hostSecurityReports") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.targetservers.update" call. -// Exactly one of *GoogleCloudApigeeV1TargetServer or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1TargetServer.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 *OrganizationsEnvironmentsTargetserversUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TargetServer, error) { +// Do executes the "apigee.organizations.hostSecurityReports.create" call. +// Exactly one of *GoogleCloudApigeeV1SecurityReport or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1SecurityReport.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 *OrganizationsHostSecurityReportsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1SecurityReport, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40533,7 +44229,7 @@ func (c *OrganizationsEnvironmentsTargetserversUpdateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1TargetServer{ + ret := &GoogleCloudApigeeV1SecurityReport{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40545,28 +44241,28 @@ func (c *OrganizationsEnvironmentsTargetserversUpdateCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Updates an existing TargetServer. Note that this operation has PUT semantics; it will replace the entirety of the existing TargetServer with the resource in the request body.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/targetservers/{targetserversId}", - // "httpMethod": "PUT", - // "id": "apigee.organizations.environments.targetservers.update", + // "description": "Submit a query at host level to be processed in the background. If the submission of the query succeeds, the API returns a 201 status and an ID that refer to the query. In addition to the HTTP status 201, the `state` of \"enqueued\" means that the request succeeded.", + // "flatPath": "v1/organizations/{organizationsId}/hostSecurityReports", + // "httpMethod": "POST", + // "id": "apigee.organizations.hostSecurityReports.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the TargetServer to replace. Must be of the form `organizations/{org}/environments/{env}/targetservers/{target_server_id}`.", + // "parent": { + // "description": "Required. The parent resource name. Must be of the form `organizations/{org}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/targetservers/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/hostSecurityReports", // "request": { - // "$ref": "GoogleCloudApigeeV1TargetServer" + // "$ref": "GoogleCloudApigeeV1SecurityReportQuery" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1TargetServer" + // "$ref": "GoogleCloudApigeeV1SecurityReport" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -40575,94 +44271,99 @@ func (c *OrganizationsEnvironmentsTargetserversUpdateCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.traceConfig.overrides.create": +// method id "apigee.organizations.hostSecurityReports.get": -type OrganizationsEnvironmentsTraceConfigOverridesCreateCall struct { - s *Service - parent string - googlecloudapigeev1traceconfigoverride *GoogleCloudApigeeV1TraceConfigOverride - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsHostSecurityReportsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a trace configuration override. The response contains -// a system-generated UUID, that can be used to view, update, or delete -// the configuration override. Use the List API to view the existing -// trace configuration overrides. +// Get: Get status of a query submitted at host level. If the query is +// still in progress, the `state` is set to "running" After the query +// has completed successfully, `state` is set to "completed" // -// - parent: Parent resource of the trace configuration override. Use -// the following structure in your request. -// "organizations/*/environments/*/traceConfig". -func (r *OrganizationsEnvironmentsTraceConfigOverridesService) Create(parent string, googlecloudapigeev1traceconfigoverride *GoogleCloudApigeeV1TraceConfigOverride) *OrganizationsEnvironmentsTraceConfigOverridesCreateCall { - c := &OrganizationsEnvironmentsTraceConfigOverridesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1traceconfigoverride = googlecloudapigeev1traceconfigoverride +// - name: Name of the security report to get. Must be of the form +// `organizations/{org}/securityReports/{reportId}`. +func (r *OrganizationsHostSecurityReportsService) Get(name string) *OrganizationsHostSecurityReportsGetCall { + c := &OrganizationsHostSecurityReportsGetCall{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 *OrganizationsEnvironmentsTraceConfigOverridesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesCreateCall { +func (c *OrganizationsHostSecurityReportsGetCall) Fields(s ...googleapi.Field) *OrganizationsHostSecurityReportsGetCall { 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 *OrganizationsHostSecurityReportsGetCall) IfNoneMatch(entityTag string) *OrganizationsHostSecurityReportsGetCall { + 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 *OrganizationsEnvironmentsTraceConfigOverridesCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsTraceConfigOverridesCreateCall { +func (c *OrganizationsHostSecurityReportsGetCall) Context(ctx context.Context) *OrganizationsHostSecurityReportsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsTraceConfigOverridesCreateCall) Header() http.Header { +func (c *OrganizationsHostSecurityReportsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsTraceConfigOverridesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsHostSecurityReportsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1traceconfigoverride) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/overrides") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.traceConfig.overrides.create" call. -// Exactly one of *GoogleCloudApigeeV1TraceConfigOverride or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudApigeeV1TraceConfigOverride.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 *OrganizationsEnvironmentsTraceConfigOverridesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TraceConfigOverride, error) { +// Do executes the "apigee.organizations.hostSecurityReports.get" call. +// Exactly one of *GoogleCloudApigeeV1SecurityReport or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1SecurityReport.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 *OrganizationsHostSecurityReportsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1SecurityReport, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40681,7 +44382,7 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesCreateCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1TraceConfigOverride{ + ret := &GoogleCloudApigeeV1SecurityReport{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40693,28 +44394,25 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesCreateCall) Do(opts ...goo } return ret, nil // { - // "description": "Creates a trace configuration override. The response contains a system-generated UUID, that can be used to view, update, or delete the configuration override. Use the List API to view the existing trace configuration overrides.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig/overrides", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.traceConfig.overrides.create", + // "description": "Get status of a query submitted at host level. If the query is still in progress, the `state` is set to \"running\" After the query has completed successfully, `state` is set to \"completed\"", + // "flatPath": "v1/organizations/{organizationsId}/hostSecurityReports/{hostSecurityReportsId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.hostSecurityReports.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Parent resource of the trace configuration override. Use the following structure in your request. \"organizations/*/environments/*/traceConfig\".", + // "name": { + // "description": "Required. Name of the security report to get. Must be of the form `organizations/{org}/securityReports/{reportId}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig$", + // "pattern": "^organizations/[^/]+/hostSecurityReports/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/overrides", - // "request": { - // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" + // "$ref": "GoogleCloudApigeeV1SecurityReport" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -40723,23 +44421,27 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesCreateCall) Do(opts ...goo } -// method id "apigee.organizations.environments.traceConfig.overrides.delete": +// method id "apigee.organizations.hostSecurityReports.getResult": -type OrganizationsEnvironmentsTraceConfigOverridesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsHostSecurityReportsGetResultCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a distributed trace configuration override. +// GetResult: After the query is completed, use this API to retrieve the +// results. If the request succeeds, and there is a non-zero result set, +// the result is downloaded to the client as a zipped JSON file. The +// name of the downloaded file will be: OfflineQueryResult-.zip Example: +// `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip` // -// - name: Name of the trace configuration override. Use the following -// structure in your request: -// "organizations/*/environments/*/traceConfig/overrides/*". -func (r *OrganizationsEnvironmentsTraceConfigOverridesService) Delete(name string) *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall { - c := &OrganizationsEnvironmentsTraceConfigOverridesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the security report result to get. Must be of the +// form `organizations/{org}/securityReports/{reportId}/result`. +func (r *OrganizationsHostSecurityReportsService) GetResult(name string) *OrganizationsHostSecurityReportsGetResultCall { + c := &OrganizationsHostSecurityReportsGetResultCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -40747,41 +44449,54 @@ func (r *OrganizationsEnvironmentsTraceConfigOverridesService) Delete(name strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall { +func (c *OrganizationsHostSecurityReportsGetResultCall) Fields(s ...googleapi.Field) *OrganizationsHostSecurityReportsGetResultCall { 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 *OrganizationsHostSecurityReportsGetResultCall) IfNoneMatch(entityTag string) *OrganizationsHostSecurityReportsGetResultCall { + 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 *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall { +func (c *OrganizationsHostSecurityReportsGetResultCall) Context(ctx context.Context) *OrganizationsHostSecurityReportsGetResultCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Header() http.Header { +func (c *OrganizationsHostSecurityReportsGetResultCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsHostSecurityReportsGetResultCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -40792,14 +44507,14 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.traceConfig.overrides.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// Do executes the "apigee.organizations.hostSecurityReports.getResult" call. +// Exactly one of *GoogleApiHttpBody 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 +// *GoogleApiHttpBody.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 *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsHostSecurityReportsGetResultCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40818,7 +44533,7 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40830,25 +44545,25 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Do(opts ...goo } return ret, nil // { - // "description": "Deletes a distributed trace configuration override.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig/overrides/{overridesId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.traceConfig.overrides.delete", + // "description": "After the query is completed, use this API to retrieve the results. If the request succeeds, and there is a non-zero result set, the result is downloaded to the client as a zipped JSON file. The name of the downloaded file will be: OfflineQueryResult-.zip Example: `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip`", + // "flatPath": "v1/organizations/{organizationsId}/hostSecurityReports/{hostSecurityReportsId}/result", + // "httpMethod": "GET", + // "id": "apigee.organizations.hostSecurityReports.getResult", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the trace configuration override. Use the following structure in your request: \"organizations/*/environments/*/traceConfig/overrides/*\".", + // "description": "Required. Name of the security report result to get. Must be of the form `organizations/{org}/securityReports/{reportId}/result`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig/overrides/[^/]+$", + // "pattern": "^organizations/[^/]+/hostSecurityReports/[^/]+/result$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleApiHttpBody" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -40857,9 +44572,9 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Do(opts ...goo } -// method id "apigee.organizations.environments.traceConfig.overrides.get": +// method id "apigee.organizations.hostSecurityReports.getResultView": -type OrganizationsEnvironmentsTraceConfigOverridesGetCall struct { +type OrganizationsHostSecurityReportsGetResultViewCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -40868,13 +44583,14 @@ type OrganizationsEnvironmentsTraceConfigOverridesGetCall struct { header_ http.Header } -// Get: Gets a trace configuration override. +// GetResultView: After the query is completed, use this API to view the +// query result when result size is small. // -// - name: Name of the trace configuration override. Use the following -// structure in your request: -// "organizations/*/environments/*/traceConfig/overrides/*". -func (r *OrganizationsEnvironmentsTraceConfigOverridesService) Get(name string) *OrganizationsEnvironmentsTraceConfigOverridesGetCall { - c := &OrganizationsEnvironmentsTraceConfigOverridesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the security report result view to get. Must be of +// the form +// `organizations/{org}/securityReports/{reportId}/resultView`. +func (r *OrganizationsHostSecurityReportsService) GetResultView(name string) *OrganizationsHostSecurityReportsGetResultViewCall { + c := &OrganizationsHostSecurityReportsGetResultViewCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -40882,7 +44598,7 @@ func (r *OrganizationsEnvironmentsTraceConfigOverridesService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesGetCall { +func (c *OrganizationsHostSecurityReportsGetResultViewCall) Fields(s ...googleapi.Field) *OrganizationsHostSecurityReportsGetResultViewCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -40892,7 +44608,7 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Fields(s ...googl // 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 *OrganizationsEnvironmentsTraceConfigOverridesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsTraceConfigOverridesGetCall { +func (c *OrganizationsHostSecurityReportsGetResultViewCall) IfNoneMatch(entityTag string) *OrganizationsHostSecurityReportsGetResultViewCall { c.ifNoneMatch_ = entityTag return c } @@ -40900,21 +44616,21 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) IfNoneMatch(entit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsTraceConfigOverridesGetCall { +func (c *OrganizationsHostSecurityReportsGetResultViewCall) Context(ctx context.Context) *OrganizationsHostSecurityReportsGetResultViewCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Header() http.Header { +func (c *OrganizationsHostSecurityReportsGetResultViewCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsHostSecurityReportsGetResultViewCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -40940,15 +44656,16 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.traceConfig.overrides.get" call. -// Exactly one of *GoogleCloudApigeeV1TraceConfigOverride or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudApigeeV1TraceConfigOverride.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 *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TraceConfigOverride, error) { +// Do executes the "apigee.organizations.hostSecurityReports.getResultView" call. +// Exactly one of *GoogleCloudApigeeV1SecurityReportResultView or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1SecurityReportResultView.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 *OrganizationsHostSecurityReportsGetResultViewCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1SecurityReportResultView, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40967,7 +44684,7 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1TraceConfigOverride{ + ret := &GoogleCloudApigeeV1SecurityReportResultView{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40979,25 +44696,25 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Do(opts ...google } return ret, nil // { - // "description": "Gets a trace configuration override.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig/overrides/{overridesId}", + // "description": "After the query is completed, use this API to view the query result when result size is small.", + // "flatPath": "v1/organizations/{organizationsId}/hostSecurityReports/{hostSecurityReportsId}/resultView", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.traceConfig.overrides.get", + // "id": "apigee.organizations.hostSecurityReports.getResultView", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the trace configuration override. Use the following structure in your request: \"organizations/*/environments/*/traceConfig/overrides/*\".", + // "description": "Required. Name of the security report result view to get. Must be of the form `organizations/{org}/securityReports/{reportId}/resultView`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig/overrides/[^/]+$", + // "pattern": "^organizations/[^/]+/hostSecurityReports/[^/]+/resultView$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" + // "$ref": "GoogleCloudApigeeV1SecurityReportResultView" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -41006,9 +44723,9 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Do(opts ...google } -// method id "apigee.organizations.environments.traceConfig.overrides.list": +// method id "apigee.organizations.hostSecurityReports.list": -type OrganizationsEnvironmentsTraceConfigOverridesListCall struct { +type OrganizationsHostSecurityReportsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -41017,40 +44734,78 @@ type OrganizationsEnvironmentsTraceConfigOverridesListCall struct { header_ http.Header } -// List: Lists all of the distributed trace configuration overrides in -// an environment. +// List: Return a list of Security Reports at host level. // -// - parent: Parent resource of the trace configuration override. Use -// the following structure in your request: -// "organizations/*/environments/*/traceConfig". -func (r *OrganizationsEnvironmentsTraceConfigOverridesService) List(parent string) *OrganizationsEnvironmentsTraceConfigOverridesListCall { - c := &OrganizationsEnvironmentsTraceConfigOverridesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource name. Must be of the form +// `organizations/{org}`. +func (r *OrganizationsHostSecurityReportsService) List(parent string) *OrganizationsHostSecurityReportsListCall { + c := &OrganizationsHostSecurityReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// trace configuration overrides to return. If not specified, the -// maximum number returned is 25. The maximum number cannot exceed 100. -func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) PageSize(pageSize int64) *OrganizationsEnvironmentsTraceConfigOverridesListCall { +// Dataset sets the optional parameter "dataset": Filter response list +// by dataset. Example: `api`, `mint` +func (c *OrganizationsHostSecurityReportsListCall) Dataset(dataset string) *OrganizationsHostSecurityReportsListCall { + c.urlParams_.Set("dataset", dataset) + return c +} + +// EnvgroupHostname sets the optional parameter "envgroupHostname": +// Required. Filter response list by hostname. +func (c *OrganizationsHostSecurityReportsListCall) EnvgroupHostname(envgroupHostname string) *OrganizationsHostSecurityReportsListCall { + c.urlParams_.Set("envgroupHostname", envgroupHostname) + return c +} + +// From sets the optional parameter "from": Filter response list by +// returning security reports that created after this date time. Time +// must be in ISO date-time format like '2011-12-03T10:15:30Z'. +func (c *OrganizationsHostSecurityReportsListCall) From(from string) *OrganizationsHostSecurityReportsListCall { + c.urlParams_.Set("from", from) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of security report to return in the list response. +func (c *OrganizationsHostSecurityReportsListCall) PageSize(pageSize int64) *OrganizationsHostSecurityReportsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, -// returned from a previous `ListTraceConfigOverrides` call. Token value -// that can be used to retrieve the subsequent page. When paginating, -// all other parameters provided to `ListTraceConfigOverrides` must -// match those specified in the call to obtain the page token. -func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) PageToken(pageToken string) *OrganizationsEnvironmentsTraceConfigOverridesListCall { +// PageToken sets the optional parameter "pageToken": Token returned +// from the previous list response to fetch the next page. +func (c *OrganizationsHostSecurityReportsListCall) PageToken(pageToken string) *OrganizationsHostSecurityReportsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// Status sets the optional parameter "status": Filter response list by +// security report status. +func (c *OrganizationsHostSecurityReportsListCall) Status(status string) *OrganizationsHostSecurityReportsListCall { + c.urlParams_.Set("status", status) + return c +} + +// SubmittedBy sets the optional parameter "submittedBy": Filter +// response list by user who submitted queries. +func (c *OrganizationsHostSecurityReportsListCall) SubmittedBy(submittedBy string) *OrganizationsHostSecurityReportsListCall { + c.urlParams_.Set("submittedBy", submittedBy) + return c +} + +// To sets the optional parameter "to": Filter response list by +// returning security reports that created before this date time. Time +// must be in ISO date-time format like '2011-12-03T10:16:30Z'. +func (c *OrganizationsHostSecurityReportsListCall) To(to string) *OrganizationsHostSecurityReportsListCall { + c.urlParams_.Set("to", to) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesListCall { +func (c *OrganizationsHostSecurityReportsListCall) Fields(s ...googleapi.Field) *OrganizationsHostSecurityReportsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -41060,7 +44815,7 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) Fields(s ...goog // 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 *OrganizationsEnvironmentsTraceConfigOverridesListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsTraceConfigOverridesListCall { +func (c *OrganizationsHostSecurityReportsListCall) IfNoneMatch(entityTag string) *OrganizationsHostSecurityReportsListCall { c.ifNoneMatch_ = entityTag return c } @@ -41068,21 +44823,21 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) IfNoneMatch(enti // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) Context(ctx context.Context) *OrganizationsEnvironmentsTraceConfigOverridesListCall { +func (c *OrganizationsHostSecurityReportsListCall) Context(ctx context.Context) *OrganizationsHostSecurityReportsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) Header() http.Header { +func (c *OrganizationsHostSecurityReportsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsHostSecurityReportsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -41095,7 +44850,7 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/overrides") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hostSecurityReports") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -41108,16 +44863,16 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.traceConfig.overrides.list" call. -// Exactly one of *GoogleCloudApigeeV1ListTraceConfigOverridesResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudApigeeV1ListTraceConfigOverridesResponse.ServerResponse.He -// ader or (if a response was returned at all) in +// Do executes the "apigee.organizations.hostSecurityReports.list" call. +// Exactly one of *GoogleCloudApigeeV1ListSecurityReportsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListSecurityReportsResponse.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 *OrganizationsEnvironmentsTraceConfigOverridesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListTraceConfigOverridesResponse, error) { +func (c *OrganizationsHostSecurityReportsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListSecurityReportsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41136,7 +44891,7 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListTraceConfigOverridesResponse{ + ret := &GoogleCloudApigeeV1ListSecurityReportsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41148,36 +44903,66 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) Do(opts ...googl } return ret, nil // { - // "description": "Lists all of the distributed trace configuration overrides in an environment.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig/overrides", + // "description": "Return a list of Security Reports at host level.", + // "flatPath": "v1/organizations/{organizationsId}/hostSecurityReports", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.traceConfig.overrides.list", + // "id": "apigee.organizations.hostSecurityReports.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "dataset": { + // "description": "Filter response list by dataset. Example: `api`, `mint`", + // "location": "query", + // "type": "string" + // }, + // "envgroupHostname": { + // "description": "Required. Filter response list by hostname.", + // "location": "query", + // "type": "string" + // }, + // "from": { + // "description": "Filter response list by returning security reports that created after this date time. Time must be in ISO date-time format like '2011-12-03T10:15:30Z'.", + // "location": "query", + // "type": "string" + // }, // "pageSize": { - // "description": "Maximum number of trace configuration overrides to return. If not specified, the maximum number returned is 25. The maximum number cannot exceed 100.", + // "description": "The maximum number of security report to return in the list response.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token, returned from a previous `ListTraceConfigOverrides` call. Token value that can be used to retrieve the subsequent page. When paginating, all other parameters provided to `ListTraceConfigOverrides` must match those specified in the call to obtain the page token.", + // "description": "Token returned from the previous list response to fetch the next page.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Parent resource of the trace configuration override. Use the following structure in your request: \"organizations/*/environments/*/traceConfig\".", + // "description": "Required. The parent resource name. Must be of the form `organizations/{org}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" + // }, + // "status": { + // "description": "Filter response list by security report status.", + // "location": "query", + // "type": "string" + // }, + // "submittedBy": { + // "description": "Filter response list by user who submitted queries.", + // "location": "query", + // "type": "string" + // }, + // "to": { + // "description": "Filter response list by returning security reports that created before this date time. Time must be in ISO date-time format like '2011-12-03T10:16:30Z'.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/overrides", + // "path": "v1/{+parent}/hostSecurityReports", // "response": { - // "$ref": "GoogleCloudApigeeV1ListTraceConfigOverridesResponse" + // "$ref": "GoogleCloudApigeeV1ListSecurityReportsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -41189,7 +44974,7 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) Do(opts ...googl // 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 *OrganizationsEnvironmentsTraceConfigOverridesListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListTraceConfigOverridesResponse) error) error { +func (c *OrganizationsHostSecurityReportsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListSecurityReportsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -41207,254 +44992,211 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) Pages(ctx contex } } -// method id "apigee.organizations.environments.traceConfig.overrides.patch": +// method id "apigee.organizations.hostStats.get": -type OrganizationsEnvironmentsTraceConfigOverridesPatchCall struct { - s *Service - name string - googlecloudapigeev1traceconfigoverride *GoogleCloudApigeeV1TraceConfigOverride - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsHostStatsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a distributed trace configuration override. Note that -// the repeated fields have replace semantics when included in the field -// mask and that they will be overwritten by the value of the fields in -// the request body. +// Get: Retrieve metrics grouped by dimensions in host level. The types +// of metrics you can retrieve include traffic, message counts, API call +// latency, response size, and cache hits and counts. Dimensions let you +// view metrics in meaningful groups. You can optionally pass dimensions +// as path parameters to the `stats` API. If dimensions are not +// specified, the metrics are computed on the entire set of data for the +// given time range. // -// - name: Name of the trace configuration override. Use the following -// structure in your request: -// "organizations/*/environments/*/traceConfig/overrides/*". -func (r *OrganizationsEnvironmentsTraceConfigOverridesService) Patch(name string, googlecloudapigeev1traceconfigoverride *GoogleCloudApigeeV1TraceConfigOverride) *OrganizationsEnvironmentsTraceConfigOverridesPatchCall { - c := &OrganizationsEnvironmentsTraceConfigOverridesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name for which the interactive query will be +// executed. Use the following format in your request: +// `organizations/{org}/hostStats/{dimensions}` Dimensions let you +// view metrics in meaningful groupings, such as `apiproxy`, +// `target_host`. The value of dimensions should be a comma-separated +// list as shown below +// `organizations/{org}/hostStats/apiproxy,request_verb`. +func (r *OrganizationsHostStatsService) Get(name string) *OrganizationsHostStatsGetCall { + c := &OrganizationsHostStatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1traceconfigoverride = googlecloudapigeev1traceconfigoverride return c } -// UpdateMask sets the optional parameter "updateMask": List of fields -// to be updated. -func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) UpdateMask(updateMask string) *OrganizationsEnvironmentsTraceConfigOverridesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Accuracy sets the optional parameter "accuracy": No longer used by +// Apigee. Supported for backwards compatibility. +func (c *OrganizationsHostStatsGetCall) Accuracy(accuracy string) *OrganizationsHostStatsGetCall { + c.urlParams_.Set("accuracy", accuracy) return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// EnvgroupHostname sets the optional parameter "envgroupHostname": +// Required. Hostname for which the interactive query will be executed. +func (c *OrganizationsHostStatsGetCall) EnvgroupHostname(envgroupHostname string) *OrganizationsHostStatsGetCall { + c.urlParams_.Set("envgroupHostname", envgroupHostname) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Context(ctx context.Context) *OrganizationsEnvironmentsTraceConfigOverridesPatchCall { - c.ctx_ = ctx +// Filter sets the optional parameter "filter": Flag that enables +// drill-down on specific dimension values. +func (c *OrganizationsHostStatsGetCall) Filter(filter string) *OrganizationsHostStatsGetCall { + c.urlParams_.Set("filter", filter) return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// Limit sets the optional parameter "limit": Maximum number of result +// items to return. The default and maximum value that can be returned +// is 14400. +func (c *OrganizationsHostStatsGetCall) Limit(limit string) *OrganizationsHostStatsGetCall { + c.urlParams_.Set("limit", limit) + return c } -func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - 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.googlecloudapigeev1traceconfigoverride) - 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, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// Offset sets the optional parameter "offset": Offset value. Use +// `offset` with `limit` to enable pagination of results. For example, +// to display results 11-20, set limit to `10` and offset to `10`. +func (c *OrganizationsHostStatsGetCall) Offset(offset string) *OrganizationsHostStatsGetCall { + c.urlParams_.Set("offset", offset) + return c } -// Do executes the "apigee.organizations.environments.traceConfig.overrides.patch" call. -// Exactly one of *GoogleCloudApigeeV1TraceConfigOverride or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudApigeeV1TraceConfigOverride.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 *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TraceConfigOverride, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudApigeeV1TraceConfigOverride{ - ServerResponse: googleapi.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 distributed trace configuration override. Note that the repeated fields have replace semantics when included in the field mask and that they will be overwritten by the value of the fields in the request body.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig/overrides/{overridesId}", - // "httpMethod": "PATCH", - // "id": "apigee.organizations.environments.traceConfig.overrides.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. Name of the trace configuration override. Use the following structure in your request: \"organizations/*/environments/*/traceConfig/overrides/*\".", - // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig/overrides/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "List of fields to be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" - // }, - // "response": { - // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } +// Realtime sets the optional parameter "realtime": No longer used by +// Apigee. Supported for backwards compatibility. +func (c *OrganizationsHostStatsGetCall) Realtime(realtime bool) *OrganizationsHostStatsGetCall { + c.urlParams_.Set("realtime", fmt.Sprint(realtime)) + return c +} + +// Select sets the optional parameter "select": Comma-separated list of +// metrics. For example: `sum(message_count),sum(error_count)` +func (c *OrganizationsHostStatsGetCall) Select(select_ string) *OrganizationsHostStatsGetCall { + c.urlParams_.Set("select", select_) + return c +} +// Sort sets the optional parameter "sort": Flag that specifies if the +// sort order should be ascending or descending. Valid values are `DESC` +// and `ASC`. +func (c *OrganizationsHostStatsGetCall) Sort(sort string) *OrganizationsHostStatsGetCall { + c.urlParams_.Set("sort", sort) + return c } -// method id "apigee.organizations.hostQueries.create": +// Sortby sets the optional parameter "sortby": Comma-separated list of +// columns to sort the final result. +func (c *OrganizationsHostStatsGetCall) Sortby(sortby string) *OrganizationsHostStatsGetCall { + c.urlParams_.Set("sortby", sortby) + return c +} -type OrganizationsHostQueriesCreateCall struct { - s *Service - parent string - googlecloudapigeev1query *GoogleCloudApigeeV1Query - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// TimeRange sets the optional parameter "timeRange": Time interval for +// the interactive query. Time range is specified in GMT as `start~end`. +// For example: `04/15/2017 00:00~05/15/2017 23:59` +func (c *OrganizationsHostStatsGetCall) TimeRange(timeRange string) *OrganizationsHostStatsGetCall { + c.urlParams_.Set("timeRange", timeRange) + return c } -// Create: Submit a query at host level to be processed in the -// background. If the submission of the query succeeds, the API returns -// a 201 status and an ID that refer to the query. In addition to the -// HTTP status 201, the `state` of "enqueued" means that the request -// succeeded. -// -// - parent: The parent resource name. Must be of the form -// `organizations/{org}`. -func (r *OrganizationsHostQueriesService) Create(parent string, googlecloudapigeev1query *GoogleCloudApigeeV1Query) *OrganizationsHostQueriesCreateCall { - c := &OrganizationsHostQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1query = googlecloudapigeev1query +// TimeUnit sets the optional parameter "timeUnit": Granularity of +// metrics returned. Valid values include: `second`, `minute`, `hour`, +// `day`, `week`, or `month`. +func (c *OrganizationsHostStatsGetCall) TimeUnit(timeUnit string) *OrganizationsHostStatsGetCall { + c.urlParams_.Set("timeUnit", timeUnit) + return c +} + +// Topk sets the optional parameter "topk": Top number of results to +// return. For example, to return the top 5 results, set `topk=5`. +func (c *OrganizationsHostStatsGetCall) Topk(topk string) *OrganizationsHostStatsGetCall { + c.urlParams_.Set("topk", topk) + return c +} + +// TsAscending sets the optional parameter "tsAscending": Flag that +// specifies whether to list timestamps in ascending (`true`) or +// descending (`false`) order. Apigee recommends that you set this value +// to `true` if you are using `sortby` with `sort=DESC`. +func (c *OrganizationsHostStatsGetCall) TsAscending(tsAscending bool) *OrganizationsHostStatsGetCall { + c.urlParams_.Set("tsAscending", fmt.Sprint(tsAscending)) + return c +} + +// Tzo sets the optional parameter "tzo": Timezone offset value. +func (c *OrganizationsHostStatsGetCall) Tzo(tzo string) *OrganizationsHostStatsGetCall { + c.urlParams_.Set("tzo", tzo) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsHostQueriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsHostQueriesCreateCall { +func (c *OrganizationsHostStatsGetCall) Fields(s ...googleapi.Field) *OrganizationsHostStatsGetCall { 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 *OrganizationsHostStatsGetCall) IfNoneMatch(entityTag string) *OrganizationsHostStatsGetCall { + 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 *OrganizationsHostQueriesCreateCall) Context(ctx context.Context) *OrganizationsHostQueriesCreateCall { +func (c *OrganizationsHostStatsGetCall) Context(ctx context.Context) *OrganizationsHostStatsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsHostQueriesCreateCall) Header() http.Header { +func (c *OrganizationsHostStatsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsHostQueriesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsHostStatsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1query) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hostQueries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.hostQueries.create" call. -// Exactly one of *GoogleCloudApigeeV1AsyncQuery or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1AsyncQuery.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.hostStats.get" call. +// Exactly one of *GoogleCloudApigeeV1Stats or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1Stats.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 *OrganizationsHostQueriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQuery, error) { +func (c *OrganizationsHostStatsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Stats, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41473,7 +45215,7 @@ func (c *OrganizationsHostQueriesCreateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1AsyncQuery{ + ret := &GoogleCloudApigeeV1Stats{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41485,28 +45227,95 @@ func (c *OrganizationsHostQueriesCreateCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Submit a query at host level to be processed in the background. If the submission of the query succeeds, the API returns a 201 status and an ID that refer to the query. In addition to the HTTP status 201, the `state` of \"enqueued\" means that the request succeeded.", - // "flatPath": "v1/organizations/{organizationsId}/hostQueries", - // "httpMethod": "POST", - // "id": "apigee.organizations.hostQueries.create", + // "description": "Retrieve metrics grouped by dimensions in host level. The types of metrics you can retrieve include traffic, message counts, API call latency, response size, and cache hits and counts. Dimensions let you view metrics in meaningful groups. You can optionally pass dimensions as path parameters to the `stats` API. If dimensions are not specified, the metrics are computed on the entire set of data for the given time range.", + // "flatPath": "v1/organizations/{organizationsId}/hostStats/{hostStatsId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.hostStats.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource name. Must be of the form `organizations/{org}`.", + // "accuracy": { + // "description": "No longer used by Apigee. Supported for backwards compatibility.", + // "location": "query", + // "type": "string" + // }, + // "envgroupHostname": { + // "description": "Required. Hostname for which the interactive query will be executed.", + // "location": "query", + // "type": "string" + // }, + // "filter": { + // "description": "Flag that enables drill-down on specific dimension values.", + // "location": "query", + // "type": "string" + // }, + // "limit": { + // "description": "Maximum number of result items to return. The default and maximum value that can be returned is 14400.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. Resource name for which the interactive query will be executed. Use the following format in your request: `organizations/{org}/hostStats/{dimensions}` Dimensions let you view metrics in meaningful groupings, such as `apiproxy`, `target_host`. The value of dimensions should be a comma-separated list as shown below `organizations/{org}/hostStats/apiproxy,request_verb`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/hostStats/.*$", // "required": true, // "type": "string" + // }, + // "offset": { + // "description": "Offset value. Use `offset` with `limit` to enable pagination of results. For example, to display results 11-20, set limit to `10` and offset to `10`.", + // "location": "query", + // "type": "string" + // }, + // "realtime": { + // "description": "No longer used by Apigee. Supported for backwards compatibility.", + // "location": "query", + // "type": "boolean" + // }, + // "select": { + // "description": "Comma-separated list of metrics. For example: `sum(message_count),sum(error_count)`", + // "location": "query", + // "type": "string" + // }, + // "sort": { + // "description": "Flag that specifies if the sort order should be ascending or descending. Valid values are `DESC` and `ASC`.", + // "location": "query", + // "type": "string" + // }, + // "sortby": { + // "description": "Comma-separated list of columns to sort the final result.", + // "location": "query", + // "type": "string" + // }, + // "timeRange": { + // "description": "Time interval for the interactive query. Time range is specified in GMT as `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59`", + // "location": "query", + // "type": "string" + // }, + // "timeUnit": { + // "description": "Granularity of metrics returned. Valid values include: `second`, `minute`, `hour`, `day`, `week`, or `month`.", + // "location": "query", + // "type": "string" + // }, + // "topk": { + // "description": "Top number of results to return. For example, to return the top 5 results, set `topk=5`.", + // "location": "query", + // "type": "string" + // }, + // "tsAscending": { + // "description": "Flag that specifies whether to list timestamps in ascending (`true`) or descending (`false`) order. Apigee recommends that you set this value to `true` if you are using `sortby` with `sort=DESC`.", + // "location": "query", + // "type": "boolean" + // }, + // "tzo": { + // "description": "Timezone offset value.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/hostQueries", - // "request": { - // "$ref": "GoogleCloudApigeeV1Query" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1AsyncQuery" + // "$ref": "GoogleCloudApigeeV1Stats" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -41515,98 +45324,91 @@ func (c *OrganizationsHostQueriesCreateCall) Do(opts ...googleapi.CallOption) (* } -// method id "apigee.organizations.hostQueries.get": +// method id "apigee.organizations.instances.create": -type OrganizationsHostQueriesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsInstancesCreateCall struct { + s *Service + parent string + googlecloudapigeev1instance *GoogleCloudApigeeV1Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Get status of a query submitted at host level. If the query is -// still in progress, the `state` is set to "running" After the query -// has completed successfully, `state` is set to "completed" +// Create: Creates an Apigee runtime instance. The instance is +// accessible from the authorized network configured on the +// organization. **Note:** Not supported for Apigee hybrid. // -// - name: Name of the asynchronous query to get. Must be of the form -// `organizations/{org}/queries/{queryId}`. -func (r *OrganizationsHostQueriesService) Get(name string) *OrganizationsHostQueriesGetCall { - c := &OrganizationsHostQueriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Name of the organization. Use the following structure in +// your request: `organizations/{org}`. +func (r *OrganizationsInstancesService) Create(parent string, googlecloudapigeev1instance *GoogleCloudApigeeV1Instance) *OrganizationsInstancesCreateCall { + c := &OrganizationsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1instance = googlecloudapigeev1instance return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsHostQueriesGetCall) Fields(s ...googleapi.Field) *OrganizationsHostQueriesGetCall { +func (c *OrganizationsInstancesCreateCall) Fields(s ...googleapi.Field) *OrganizationsInstancesCreateCall { 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 *OrganizationsHostQueriesGetCall) IfNoneMatch(entityTag string) *OrganizationsHostQueriesGetCall { - 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 *OrganizationsHostQueriesGetCall) Context(ctx context.Context) *OrganizationsHostQueriesGetCall { +func (c *OrganizationsInstancesCreateCall) Context(ctx context.Context) *OrganizationsInstancesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsHostQueriesGetCall) Header() http.Header { +func (c *OrganizationsInstancesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsHostQueriesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1instance) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.hostQueries.get" call. -// Exactly one of *GoogleCloudApigeeV1AsyncQuery or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1AsyncQuery.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.instances.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 *OrganizationsHostQueriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQuery, error) { +func (c *OrganizationsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41625,7 +45427,7 @@ func (c *OrganizationsHostQueriesGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1AsyncQuery{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41637,25 +45439,28 @@ func (c *OrganizationsHostQueriesGetCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Get status of a query submitted at host level. If the query is still in progress, the `state` is set to \"running\" After the query has completed successfully, `state` is set to \"completed\"", - // "flatPath": "v1/organizations/{organizationsId}/hostQueries/{hostQueriesId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.hostQueries.get", + // "description": "Creates an Apigee runtime instance. The instance is accessible from the authorized network configured on the organization. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances", + // "httpMethod": "POST", + // "id": "apigee.organizations.instances.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the asynchronous query to get. Must be of the form `organizations/{org}/queries/{queryId}`.", + // "parent": { + // "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/hostQueries/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/instances", + // "request": { + // "$ref": "GoogleCloudApigeeV1Instance" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1AsyncQuery" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -41664,27 +45469,24 @@ func (c *OrganizationsHostQueriesGetCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "apigee.organizations.hostQueries.getResult": +// method id "apigee.organizations.instances.delete": -type OrganizationsHostQueriesGetResultCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsInstancesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetResult: After the query is completed, use this API to retrieve the -// results. If the request succeeds, and there is a non-zero result set, -// the result is downloaded to the client as a zipped JSON file. The -// name of the downloaded file will be: OfflineQueryResult-.zip Example: -// `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip` +// Delete: Deletes an Apigee runtime instance. The instance stops +// serving requests and the runtime data is deleted. **Note:** Not +// supported for Apigee hybrid. // -// - name: Name of the asynchronous query result to get. Must be of the -// form `organizations/{org}/queries/{queryId}/result`. -func (r *OrganizationsHostQueriesService) GetResult(name string) *OrganizationsHostQueriesGetResultCall { - c := &OrganizationsHostQueriesGetResultCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the instance. Use the following structure in your +// request: `organizations/{org}/instances/{instance}`. +func (r *OrganizationsInstancesService) Delete(name string) *OrganizationsInstancesDeleteCall { + c := &OrganizationsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -41692,54 +45494,41 @@ func (r *OrganizationsHostQueriesService) GetResult(name string) *OrganizationsH // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsHostQueriesGetResultCall) Fields(s ...googleapi.Field) *OrganizationsHostQueriesGetResultCall { +func (c *OrganizationsInstancesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInstancesDeleteCall { 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 *OrganizationsHostQueriesGetResultCall) IfNoneMatch(entityTag string) *OrganizationsHostQueriesGetResultCall { - 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 *OrganizationsHostQueriesGetResultCall) Context(ctx context.Context) *OrganizationsHostQueriesGetResultCall { +func (c *OrganizationsInstancesDeleteCall) Context(ctx context.Context) *OrganizationsInstancesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsHostQueriesGetResultCall) Header() http.Header { +func (c *OrganizationsInstancesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsHostQueriesGetResultCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -41750,14 +45539,14 @@ func (c *OrganizationsHostQueriesGetResultCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.hostQueries.getResult" call. -// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.instances.delete" 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 *OrganizationsHostQueriesGetResultCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +func (c *OrganizationsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41776,7 +45565,7 @@ func (c *OrganizationsHostQueriesGetResultCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleApiHttpBody{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41788,25 +45577,25 @@ func (c *OrganizationsHostQueriesGetResultCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "After the query is completed, use this API to retrieve the results. If the request succeeds, and there is a non-zero result set, the result is downloaded to the client as a zipped JSON file. The name of the downloaded file will be: OfflineQueryResult-.zip Example: `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip`", - // "flatPath": "v1/organizations/{organizationsId}/hostQueries/{hostQueriesId}/result", - // "httpMethod": "GET", - // "id": "apigee.organizations.hostQueries.getResult", + // "description": "Deletes an Apigee runtime instance. The instance stops serving requests and the runtime data is deleted. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.instances.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the asynchronous query result to get. Must be of the form `organizations/{org}/queries/{queryId}/result`.", + // "description": "Required. Name of the instance. Use the following structure in your request: `organizations/{org}/instances/{instance}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/hostQueries/[^/]+/result$", + // "pattern": "^organizations/[^/]+/instances/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleApiHttpBody" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -41815,9 +45604,9 @@ func (c *OrganizationsHostQueriesGetResultCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.hostQueries.getResultView": +// method id "apigee.organizations.instances.get": -type OrganizationsHostQueriesGetResultViewCall struct { +type OrganizationsInstancesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -41826,12 +45615,13 @@ type OrganizationsHostQueriesGetResultViewCall struct { header_ http.Header } -// GetResultView: +// Get: Gets the details for an Apigee runtime instance. **Note:** Not +// supported for Apigee hybrid. // -// - name: Name of the asynchronous query result view to get. Must be of -// the form `organizations/{org}/queries/{queryId}/resultView`. -func (r *OrganizationsHostQueriesService) GetResultView(name string) *OrganizationsHostQueriesGetResultViewCall { - c := &OrganizationsHostQueriesGetResultViewCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the instance. Use the following structure in your +// request: `organizations/{org}/instances/{instance}`. +func (r *OrganizationsInstancesService) Get(name string) *OrganizationsInstancesGetCall { + c := &OrganizationsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -41839,7 +45629,7 @@ func (r *OrganizationsHostQueriesService) GetResultView(name string) *Organizati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsHostQueriesGetResultViewCall) Fields(s ...googleapi.Field) *OrganizationsHostQueriesGetResultViewCall { +func (c *OrganizationsInstancesGetCall) Fields(s ...googleapi.Field) *OrganizationsInstancesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -41849,7 +45639,7 @@ func (c *OrganizationsHostQueriesGetResultViewCall) Fields(s ...googleapi.Field) // 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 *OrganizationsHostQueriesGetResultViewCall) IfNoneMatch(entityTag string) *OrganizationsHostQueriesGetResultViewCall { +func (c *OrganizationsInstancesGetCall) IfNoneMatch(entityTag string) *OrganizationsInstancesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -41857,21 +45647,21 @@ func (c *OrganizationsHostQueriesGetResultViewCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsHostQueriesGetResultViewCall) Context(ctx context.Context) *OrganizationsHostQueriesGetResultViewCall { +func (c *OrganizationsInstancesGetCall) Context(ctx context.Context) *OrganizationsInstancesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsHostQueriesGetResultViewCall) Header() http.Header { +func (c *OrganizationsInstancesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsHostQueriesGetResultViewCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -41897,15 +45687,14 @@ func (c *OrganizationsHostQueriesGetResultViewCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.hostQueries.getResultView" call. -// Exactly one of *GoogleCloudApigeeV1AsyncQueryResultView or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudApigeeV1AsyncQueryResultView.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 +// Do executes the "apigee.organizations.instances.get" call. +// Exactly one of *GoogleCloudApigeeV1Instance or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1Instance.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 *OrganizationsHostQueriesGetResultViewCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQueryResultView, error) { +func (c *OrganizationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Instance, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41924,7 +45713,7 @@ func (c *OrganizationsHostQueriesGetResultViewCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1AsyncQueryResultView{ + ret := &GoogleCloudApigeeV1Instance{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41936,25 +45725,25 @@ func (c *OrganizationsHostQueriesGetResultViewCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "", - // "flatPath": "v1/organizations/{organizationsId}/hostQueries/{hostQueriesId}/resultView", + // "description": "Gets the details for an Apigee runtime instance. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}", // "httpMethod": "GET", - // "id": "apigee.organizations.hostQueries.getResultView", + // "id": "apigee.organizations.instances.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the asynchronous query result view to get. Must be of the form `organizations/{org}/queries/{queryId}/resultView`.", + // "description": "Required. Name of the instance. Use the following structure in your request: `organizations/{org}/instances/{instance}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/hostQueries/[^/]+/resultView$", + // "pattern": "^organizations/[^/]+/instances/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1AsyncQueryResultView" + // "$ref": "GoogleCloudApigeeV1Instance" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -41963,9 +45752,9 @@ func (c *OrganizationsHostQueriesGetResultViewCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.hostQueries.list": +// method id "apigee.organizations.instances.list": -type OrganizationsHostQueriesListCall struct { +type OrganizationsInstancesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -41974,72 +45763,36 @@ type OrganizationsHostQueriesListCall struct { header_ http.Header } -// List: Return a list of Asynchronous Queries at host level. +// List: Lists all Apigee runtime instances for the organization. +// **Note:** Not supported for Apigee hybrid. // -// - parent: The parent resource name. Must be of the form -// `organizations/{org}`. -func (r *OrganizationsHostQueriesService) List(parent string) *OrganizationsHostQueriesListCall { - c := &OrganizationsHostQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the organization. Use the following structure in +// your request: `organizations/{org}`. +func (r *OrganizationsInstancesService) List(parent string) *OrganizationsInstancesListCall { + c := &OrganizationsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Dataset sets the optional parameter "dataset": Filter response list -// by dataset. Example: `api`, `mint` -func (c *OrganizationsHostQueriesListCall) Dataset(dataset string) *OrganizationsHostQueriesListCall { - c.urlParams_.Set("dataset", dataset) - return c -} - -// EnvgroupHostname sets the optional parameter "envgroupHostname": -// Required. Filter response list by hostname. -func (c *OrganizationsHostQueriesListCall) EnvgroupHostname(envgroupHostname string) *OrganizationsHostQueriesListCall { - c.urlParams_.Set("envgroupHostname", envgroupHostname) - return c -} - -// From sets the optional parameter "from": Filter response list by -// returning asynchronous queries that created after this date time. -// Time must be in ISO date-time format like '2011-12-03T10:15:30Z'. -func (c *OrganizationsHostQueriesListCall) From(from string) *OrganizationsHostQueriesListCall { - c.urlParams_.Set("from", from) - return c -} - -// InclQueriesWithoutReport sets the optional parameter -// "inclQueriesWithoutReport": Flag to include asynchronous queries that -// don't have a report denifition. -func (c *OrganizationsHostQueriesListCall) InclQueriesWithoutReport(inclQueriesWithoutReport string) *OrganizationsHostQueriesListCall { - c.urlParams_.Set("inclQueriesWithoutReport", inclQueriesWithoutReport) - return c -} - -// Status sets the optional parameter "status": Filter response list by -// asynchronous query status. -func (c *OrganizationsHostQueriesListCall) Status(status string) *OrganizationsHostQueriesListCall { - c.urlParams_.Set("status", status) - return c -} - -// SubmittedBy sets the optional parameter "submittedBy": Filter -// response list by user who submitted queries. -func (c *OrganizationsHostQueriesListCall) SubmittedBy(submittedBy string) *OrganizationsHostQueriesListCall { - c.urlParams_.Set("submittedBy", submittedBy) +// PageSize sets the optional parameter "pageSize": Maximum number of +// instances to return. Defaults to 25. +func (c *OrganizationsInstancesListCall) PageSize(pageSize int64) *OrganizationsInstancesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c -} - -// To sets the optional parameter "to": Filter response list by -// returning asynchronous queries that created before this date time. -// Time must be in ISO date-time format like '2011-12-03T10:16:30Z'. -func (c *OrganizationsHostQueriesListCall) To(to string) *OrganizationsHostQueriesListCall { - c.urlParams_.Set("to", to) +} + +// PageToken sets the optional parameter "pageToken": Page token, +// returned from a previous ListInstances call, that you can use to +// retrieve the next page of content. +func (c *OrganizationsInstancesListCall) PageToken(pageToken string) *OrganizationsInstancesListCall { + 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 *OrganizationsHostQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsHostQueriesListCall { +func (c *OrganizationsInstancesListCall) Fields(s ...googleapi.Field) *OrganizationsInstancesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -42049,7 +45802,7 @@ func (c *OrganizationsHostQueriesListCall) Fields(s ...googleapi.Field) *Organiz // 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 *OrganizationsHostQueriesListCall) IfNoneMatch(entityTag string) *OrganizationsHostQueriesListCall { +func (c *OrganizationsInstancesListCall) IfNoneMatch(entityTag string) *OrganizationsInstancesListCall { c.ifNoneMatch_ = entityTag return c } @@ -42057,21 +45810,21 @@ func (c *OrganizationsHostQueriesListCall) IfNoneMatch(entityTag string) *Organi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsHostQueriesListCall) Context(ctx context.Context) *OrganizationsHostQueriesListCall { +func (c *OrganizationsInstancesListCall) Context(ctx context.Context) *OrganizationsInstancesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsHostQueriesListCall) Header() http.Header { +func (c *OrganizationsInstancesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsHostQueriesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -42084,7 +45837,7 @@ func (c *OrganizationsHostQueriesListCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hostQueries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -42097,16 +45850,16 @@ func (c *OrganizationsHostQueriesListCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.hostQueries.list" call. -// Exactly one of *GoogleCloudApigeeV1ListAsyncQueriesResponse or error +// Do executes the "apigee.organizations.instances.list" call. +// Exactly one of *GoogleCloudApigeeV1ListInstancesResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudApigeeV1ListAsyncQueriesResponse.ServerResponse.Header or +// *GoogleCloudApigeeV1ListInstancesResponse.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 *OrganizationsHostQueriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListAsyncQueriesResponse, error) { +func (c *OrganizationsInstancesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListInstancesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42125,7 +45878,7 @@ func (c *OrganizationsHostQueriesListCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListAsyncQueriesResponse{ + ret := &GoogleCloudApigeeV1ListInstancesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -42137,60 +45890,36 @@ func (c *OrganizationsHostQueriesListCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Return a list of Asynchronous Queries at host level.", - // "flatPath": "v1/organizations/{organizationsId}/hostQueries", + // "description": "Lists all Apigee runtime instances for the organization. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances", // "httpMethod": "GET", - // "id": "apigee.organizations.hostQueries.list", + // "id": "apigee.organizations.instances.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "dataset": { - // "description": "Filter response list by dataset. Example: `api`, `mint`", - // "location": "query", - // "type": "string" - // }, - // "envgroupHostname": { - // "description": "Required. Filter response list by hostname.", - // "location": "query", - // "type": "string" - // }, - // "from": { - // "description": "Filter response list by returning asynchronous queries that created after this date time. Time must be in ISO date-time format like '2011-12-03T10:15:30Z'.", + // "pageSize": { + // "description": "Maximum number of instances to return. Defaults to 25.", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // }, - // "inclQueriesWithoutReport": { - // "description": "Flag to include asynchronous queries that don't have a report denifition.", + // "pageToken": { + // "description": "Page token, returned from a previous ListInstances call, that you can use to retrieve the next page of content.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent resource name. Must be of the form `organizations/{org}`.", + // "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}`.", // "location": "path", // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" - // }, - // "status": { - // "description": "Filter response list by asynchronous query status.", - // "location": "query", - // "type": "string" - // }, - // "submittedBy": { - // "description": "Filter response list by user who submitted queries.", - // "location": "query", - // "type": "string" - // }, - // "to": { - // "description": "Filter response list by returning asynchronous queries that created before this date time. Time must be in ISO date-time format like '2011-12-03T10:16:30Z'.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/hostQueries", + // "path": "v1/{+parent}/instances", // "response": { - // "$ref": "GoogleCloudApigeeV1ListAsyncQueriesResponse" + // "$ref": "GoogleCloudApigeeV1ListInstancesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -42199,211 +45928,271 @@ func (c *OrganizationsHostQueriesListCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "apigee.organizations.hostStats.get": - -type OrganizationsHostStatsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieve metrics grouped by dimensions in host level. The types -// of metrics you can retrieve include traffic, message counts, API call -// latency, response size, and cache hits and counts. Dimensions let you -// view metrics in meaningful groups. You can optionally pass dimensions -// as path parameters to the `stats` API. If dimensions are not -// specified, the metrics are computed on the entire set of data for the -// given time range. -// -// - name: Resource name for which the interactive query will be -// executed. Use the following format in your request: -// `organizations/{org}/hostStats/{dimensions}` Dimensions let you -// view metrics in meaningful groupings, such as `apiproxy`, -// `target_host`. The value of dimensions should be a comma-separated -// list as shown below -// `organizations/{org}/hostStats/apiproxy,request_verb`. -func (r *OrganizationsHostStatsService) Get(name string) *OrganizationsHostStatsGetCall { - c := &OrganizationsHostStatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Accuracy sets the optional parameter "accuracy": No longer used by -// Apigee. Supported for backwards compatibility. -func (c *OrganizationsHostStatsGetCall) Accuracy(accuracy string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("accuracy", accuracy) - return c +// 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 *OrganizationsInstancesListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListInstancesResponse) 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) + } } -// EnvgroupHostname sets the optional parameter "envgroupHostname": -// Required. Hostname for which the interactive query will be executed. -func (c *OrganizationsHostStatsGetCall) EnvgroupHostname(envgroupHostname string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("envgroupHostname", envgroupHostname) - return c -} +// method id "apigee.organizations.instances.patch": -// Filter sets the optional parameter "filter": Flag that enables -// drill-down on specific dimension values. -func (c *OrganizationsHostStatsGetCall) Filter(filter string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("filter", filter) - return c +type OrganizationsInstancesPatchCall struct { + s *Service + name string + googlecloudapigeev1instance *GoogleCloudApigeeV1Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Limit sets the optional parameter "limit": Maximum number of result -// items to return. The default and maximum value that can be returned -// is 14400. -func (c *OrganizationsHostStatsGetCall) Limit(limit string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("limit", limit) +// Patch: Updates an Apigee runtime instance. You can update the fields +// described in NodeConfig. No other fields will be updated. **Note:** +// Not supported for Apigee hybrid. +// +// - name: Name of the instance. Use the following structure in your +// request: `organizations/{org}/instances/{instance}`. +func (r *OrganizationsInstancesService) Patch(name string, googlecloudapigeev1instance *GoogleCloudApigeeV1Instance) *OrganizationsInstancesPatchCall { + c := &OrganizationsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1instance = googlecloudapigeev1instance return c } -// Offset sets the optional parameter "offset": Offset value. Use -// `offset` with `limit` to enable pagination of results. For example, -// to display results 11-20, set limit to `10` and offset to `10`. -func (c *OrganizationsHostStatsGetCall) Offset(offset string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("offset", offset) +// UpdateMask sets the optional parameter "updateMask": List of fields +// to be updated. +func (c *OrganizationsInstancesPatchCall) UpdateMask(updateMask string) *OrganizationsInstancesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } -// Realtime sets the optional parameter "realtime": No longer used by -// Apigee. Supported for backwards compatibility. -func (c *OrganizationsHostStatsGetCall) Realtime(realtime bool) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("realtime", fmt.Sprint(realtime)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsInstancesPatchCall) Fields(s ...googleapi.Field) *OrganizationsInstancesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Select sets the optional parameter "select": Comma-separated list of -// metrics. For example: `sum(message_count),sum(error_count)` -func (c *OrganizationsHostStatsGetCall) Select(select_ string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("select", select_) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsInstancesPatchCall) Context(ctx context.Context) *OrganizationsInstancesPatchCall { + c.ctx_ = ctx return c } -// Sort sets the optional parameter "sort": Flag that specifies if the -// sort order should be ascending or descending. Valid values are `DESC` -// and `ASC`. -func (c *OrganizationsHostStatsGetCall) Sort(sort string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("sort", sort) - return c +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsInstancesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -// Sortby sets the optional parameter "sortby": Comma-separated list of -// columns to sort the final result. -func (c *OrganizationsHostStatsGetCall) Sortby(sortby string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("sortby", sortby) - return c +func (c *OrganizationsInstancesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googlecloudapigeev1instance) + 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, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// TimeRange sets the optional parameter "timeRange": Time interval for -// the interactive query. Time range is specified in GMT as `start~end`. -// For example: `04/15/2017 00:00~05/15/2017 23:59` -func (c *OrganizationsHostStatsGetCall) TimeRange(timeRange string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("timeRange", timeRange) - return c -} +// Do executes the "apigee.organizations.instances.patch" 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 *OrganizationsInstancesPatchCall) 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": "Updates an Apigee runtime instance. You can update the fields described in NodeConfig. No other fields will be updated. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}", + // "httpMethod": "PATCH", + // "id": "apigee.organizations.instances.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the instance. Use the following structure in your request: `organizations/{org}/instances/{instance}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "List of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1Instance" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } -// TimeUnit sets the optional parameter "timeUnit": Granularity of -// metrics returned. Valid values include: `second`, `minute`, `hour`, -// `day`, `week`, or `month`. -func (c *OrganizationsHostStatsGetCall) TimeUnit(timeUnit string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("timeUnit", timeUnit) - return c } -// Topk sets the optional parameter "topk": Top number of results to -// return. For example, to return the top 5 results, set `topk=5`. -func (c *OrganizationsHostStatsGetCall) Topk(topk string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("topk", topk) - return c -} +// method id "apigee.organizations.instances.reportStatus": -// TsAscending sets the optional parameter "tsAscending": Flag that -// specifies whether to list timestamps in ascending (`true`) or -// descending (`false`) order. Apigee recommends that you set this value -// to `true` if you are using `sortby` with `sort=DESC`. -func (c *OrganizationsHostStatsGetCall) TsAscending(tsAscending bool) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("tsAscending", fmt.Sprint(tsAscending)) - return c +type OrganizationsInstancesReportStatusCall struct { + s *Service + instance string + googlecloudapigeev1reportinstancestatusrequest *GoogleCloudApigeeV1ReportInstanceStatusRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Tzo sets the optional parameter "tzo": Timezone offset value. -func (c *OrganizationsHostStatsGetCall) Tzo(tzo string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("tzo", tzo) +// ReportStatus: Reports the latest status for a runtime instance. +// +// - instance: The name of the instance reporting this status. For SaaS +// the request will be rejected if no instance exists under this name. +// Format is organizations/{org}/instances/{instance}. +func (r *OrganizationsInstancesService) ReportStatus(instance string, googlecloudapigeev1reportinstancestatusrequest *GoogleCloudApigeeV1ReportInstanceStatusRequest) *OrganizationsInstancesReportStatusCall { + c := &OrganizationsInstancesReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.instance = instance + c.googlecloudapigeev1reportinstancestatusrequest = googlecloudapigeev1reportinstancestatusrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsHostStatsGetCall) Fields(s ...googleapi.Field) *OrganizationsHostStatsGetCall { +func (c *OrganizationsInstancesReportStatusCall) Fields(s ...googleapi.Field) *OrganizationsInstancesReportStatusCall { 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 *OrganizationsHostStatsGetCall) IfNoneMatch(entityTag string) *OrganizationsHostStatsGetCall { - 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 *OrganizationsHostStatsGetCall) Context(ctx context.Context) *OrganizationsHostStatsGetCall { +func (c *OrganizationsInstancesReportStatusCall) Context(ctx context.Context) *OrganizationsInstancesReportStatusCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsHostStatsGetCall) Header() http.Header { +func (c *OrganizationsInstancesReportStatusCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsHostStatsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesReportStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1reportinstancestatusrequest) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+instance}:reportStatus") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.hostStats.get" call. -// Exactly one of *GoogleCloudApigeeV1Stats or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1Stats.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 *OrganizationsHostStatsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Stats, error) { +// Do executes the "apigee.organizations.instances.reportStatus" call. +// Exactly one of *GoogleCloudApigeeV1ReportInstanceStatusResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ReportInstanceStatusResponse.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 *OrganizationsInstancesReportStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ReportInstanceStatusResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42422,7 +46211,7 @@ func (c *OrganizationsHostStatsGetCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Stats{ + ret := &GoogleCloudApigeeV1ReportInstanceStatusResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -42434,95 +46223,28 @@ func (c *OrganizationsHostStatsGetCall) Do(opts ...googleapi.CallOption) (*Googl } return ret, nil // { - // "description": "Retrieve metrics grouped by dimensions in host level. The types of metrics you can retrieve include traffic, message counts, API call latency, response size, and cache hits and counts. Dimensions let you view metrics in meaningful groups. You can optionally pass dimensions as path parameters to the `stats` API. If dimensions are not specified, the metrics are computed on the entire set of data for the given time range.", - // "flatPath": "v1/organizations/{organizationsId}/hostStats/{hostStatsId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.hostStats.get", + // "description": "Reports the latest status for a runtime instance.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}:reportStatus", + // "httpMethod": "POST", + // "id": "apigee.organizations.instances.reportStatus", // "parameterOrder": [ - // "name" + // "instance" // ], // "parameters": { - // "accuracy": { - // "description": "No longer used by Apigee. Supported for backwards compatibility.", - // "location": "query", - // "type": "string" - // }, - // "envgroupHostname": { - // "description": "Required. Hostname for which the interactive query will be executed.", - // "location": "query", - // "type": "string" - // }, - // "filter": { - // "description": "Flag that enables drill-down on specific dimension values.", - // "location": "query", - // "type": "string" - // }, - // "limit": { - // "description": "Maximum number of result items to return. The default and maximum value that can be returned is 14400.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "Required. Resource name for which the interactive query will be executed. Use the following format in your request: `organizations/{org}/hostStats/{dimensions}` Dimensions let you view metrics in meaningful groupings, such as `apiproxy`, `target_host`. The value of dimensions should be a comma-separated list as shown below `organizations/{org}/hostStats/apiproxy,request_verb`", + // "instance": { + // "description": "The name of the instance reporting this status. For SaaS the request will be rejected if no instance exists under this name. Format is organizations/{org}/instances/{instance}", // "location": "path", - // "pattern": "^organizations/[^/]+/hostStats/.*$", + // "pattern": "^organizations/[^/]+/instances/[^/]+$", // "required": true, // "type": "string" - // }, - // "offset": { - // "description": "Offset value. Use `offset` with `limit` to enable pagination of results. For example, to display results 11-20, set limit to `10` and offset to `10`.", - // "location": "query", - // "type": "string" - // }, - // "realtime": { - // "description": "No longer used by Apigee. Supported for backwards compatibility.", - // "location": "query", - // "type": "boolean" - // }, - // "select": { - // "description": "Comma-separated list of metrics. For example: `sum(message_count),sum(error_count)`", - // "location": "query", - // "type": "string" - // }, - // "sort": { - // "description": "Flag that specifies if the sort order should be ascending or descending. Valid values are `DESC` and `ASC`.", - // "location": "query", - // "type": "string" - // }, - // "sortby": { - // "description": "Comma-separated list of columns to sort the final result.", - // "location": "query", - // "type": "string" - // }, - // "timeRange": { - // "description": "Time interval for the interactive query. Time range is specified in GMT as `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59`", - // "location": "query", - // "type": "string" - // }, - // "timeUnit": { - // "description": "Granularity of metrics returned. Valid values include: `second`, `minute`, `hour`, `day`, `week`, or `month`.", - // "location": "query", - // "type": "string" - // }, - // "topk": { - // "description": "Top number of results to return. For example, to return the top 5 results, set `topk=5`.", - // "location": "query", - // "type": "string" - // }, - // "tsAscending": { - // "description": "Flag that specifies whether to list timestamps in ascending (`true`) or descending (`false`) order. Apigee recommends that you set this value to `true` if you are using `sortby` with `sort=DESC`.", - // "location": "query", - // "type": "boolean" - // }, - // "tzo": { - // "description": "Timezone offset value.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+instance}:reportStatus", + // "request": { + // "$ref": "GoogleCloudApigeeV1ReportInstanceStatusRequest" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Stats" + // "$ref": "GoogleCloudApigeeV1ReportInstanceStatusResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -42531,34 +46253,33 @@ func (c *OrganizationsHostStatsGetCall) Do(opts ...googleapi.CallOption) (*Googl } -// method id "apigee.organizations.instances.create": +// method id "apigee.organizations.instances.attachments.create": -type OrganizationsInstancesCreateCall struct { - s *Service - parent string - googlecloudapigeev1instance *GoogleCloudApigeeV1Instance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsInstancesAttachmentsCreateCall struct { + s *Service + parent string + googlecloudapigeev1instanceattachment *GoogleCloudApigeeV1InstanceAttachment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an Apigee runtime instance. The instance is -// accessible from the authorized network configured on the -// organization. **Note:** Not supported for Apigee hybrid. +// Create: Creates a new attachment of an environment to an instance. +// **Note:** Not supported for Apigee hybrid. // -// - parent: Name of the organization. Use the following structure in -// your request: `organizations/{org}`. -func (r *OrganizationsInstancesService) Create(parent string, googlecloudapigeev1instance *GoogleCloudApigeeV1Instance) *OrganizationsInstancesCreateCall { - c := &OrganizationsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the instance. Use the following structure in your +// request: `organizations/{org}/instances/{instance}`. +func (r *OrganizationsInstancesAttachmentsService) Create(parent string, googlecloudapigeev1instanceattachment *GoogleCloudApigeeV1InstanceAttachment) *OrganizationsInstancesAttachmentsCreateCall { + c := &OrganizationsInstancesAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1instance = googlecloudapigeev1instance + c.googlecloudapigeev1instanceattachment = googlecloudapigeev1instanceattachment return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesCreateCall) Fields(s ...googleapi.Field) *OrganizationsInstancesCreateCall { +func (c *OrganizationsInstancesAttachmentsCreateCall) Fields(s ...googleapi.Field) *OrganizationsInstancesAttachmentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -42566,21 +46287,21 @@ func (c *OrganizationsInstancesCreateCall) Fields(s ...googleapi.Field) *Organiz // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInstancesCreateCall) Context(ctx context.Context) *OrganizationsInstancesCreateCall { +func (c *OrganizationsInstancesAttachmentsCreateCall) Context(ctx context.Context) *OrganizationsInstancesAttachmentsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesCreateCall) Header() http.Header { +func (c *OrganizationsInstancesAttachmentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesAttachmentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -42588,14 +46309,14 @@ func (c *OrganizationsInstancesCreateCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1instance) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1instanceattachment) 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, "v1/{+parent}/instances") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attachments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -42608,14 +46329,14 @@ func (c *OrganizationsInstancesCreateCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.create" call. +// Do executes the "apigee.organizations.instances.attachments.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 *OrganizationsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsInstancesAttachmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42646,25 +46367,25 @@ func (c *OrganizationsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Creates an Apigee runtime instance. The instance is accessible from the authorized network configured on the organization. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/instances", + // "description": "Creates a new attachment of an environment to an instance. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/attachments", // "httpMethod": "POST", - // "id": "apigee.organizations.instances.create", + // "id": "apigee.organizations.instances.attachments.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}`.", + // "description": "Required. Name of the instance. Use the following structure in your request: `organizations/{org}/instances/{instance}`.", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/instances/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/instances", + // "path": "v1/{+parent}/attachments", // "request": { - // "$ref": "GoogleCloudApigeeV1Instance" + // "$ref": "GoogleCloudApigeeV1InstanceAttachment" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -42676,9 +46397,9 @@ func (c *OrganizationsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "apigee.organizations.instances.delete": +// method id "apigee.organizations.instances.attachments.delete": -type OrganizationsInstancesDeleteCall struct { +type OrganizationsInstancesAttachmentsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -42686,14 +46407,14 @@ type OrganizationsInstancesDeleteCall struct { header_ http.Header } -// Delete: Deletes an Apigee runtime instance. The instance stops -// serving requests and the runtime data is deleted. **Note:** Not -// supported for Apigee hybrid. +// Delete: Deletes an attachment. **Note:** Not supported for Apigee +// hybrid. // -// - name: Name of the instance. Use the following structure in your -// request: `organizations/{org}/instances/{instance}`. -func (r *OrganizationsInstancesService) Delete(name string) *OrganizationsInstancesDeleteCall { - c := &OrganizationsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the attachment. Use the following structure in your +// request: +// `organizations/{org}/instances/{instance}/attachments/{attachment}`. +func (r *OrganizationsInstancesAttachmentsService) Delete(name string) *OrganizationsInstancesAttachmentsDeleteCall { + c := &OrganizationsInstancesAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -42701,7 +46422,7 @@ func (r *OrganizationsInstancesService) Delete(name string) *OrganizationsInstan // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInstancesDeleteCall { +func (c *OrganizationsInstancesAttachmentsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInstancesAttachmentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -42709,21 +46430,21 @@ func (c *OrganizationsInstancesDeleteCall) Fields(s ...googleapi.Field) *Organiz // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInstancesDeleteCall) Context(ctx context.Context) *OrganizationsInstancesDeleteCall { +func (c *OrganizationsInstancesAttachmentsDeleteCall) Context(ctx context.Context) *OrganizationsInstancesAttachmentsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesDeleteCall) Header() http.Header { +func (c *OrganizationsInstancesAttachmentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -42746,14 +46467,14 @@ func (c *OrganizationsInstancesDeleteCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.delete" call. +// Do executes the "apigee.organizations.instances.attachments.delete" 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 *OrganizationsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsInstancesAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42784,18 +46505,18 @@ func (c *OrganizationsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Deletes an Apigee runtime instance. The instance stops serving requests and the runtime data is deleted. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}", + // "description": "Deletes an attachment. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/attachments/{attachmentsId}", // "httpMethod": "DELETE", - // "id": "apigee.organizations.instances.delete", + // "id": "apigee.organizations.instances.attachments.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the instance. Use the following structure in your request: `organizations/{org}/instances/{instance}`.", + // "description": "Required. Name of the attachment. Use the following structure in your request: `organizations/{org}/instances/{instance}/attachments/{attachment}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/instances/[^/]+$", + // "pattern": "^organizations/[^/]+/instances/[^/]+/attachments/[^/]+$", // "required": true, // "type": "string" // } @@ -42811,9 +46532,9 @@ func (c *OrganizationsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "apigee.organizations.instances.get": +// method id "apigee.organizations.instances.attachments.get": -type OrganizationsInstancesGetCall struct { +type OrganizationsInstancesAttachmentsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -42822,13 +46543,13 @@ type OrganizationsInstancesGetCall struct { header_ http.Header } -// Get: Gets the details for an Apigee runtime instance. **Note:** Not -// supported for Apigee hybrid. +// Get: Gets an attachment. **Note:** Not supported for Apigee hybrid. // -// - name: Name of the instance. Use the following structure in your -// request: `organizations/{org}/instances/{instance}`. -func (r *OrganizationsInstancesService) Get(name string) *OrganizationsInstancesGetCall { - c := &OrganizationsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the attachment. Use the following structure in your +// request: +// `organizations/{org}/instances/{instance}/attachments/{attachment}`. +func (r *OrganizationsInstancesAttachmentsService) Get(name string) *OrganizationsInstancesAttachmentsGetCall { + c := &OrganizationsInstancesAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -42836,7 +46557,7 @@ func (r *OrganizationsInstancesService) Get(name string) *OrganizationsInstances // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesGetCall) Fields(s ...googleapi.Field) *OrganizationsInstancesGetCall { +func (c *OrganizationsInstancesAttachmentsGetCall) Fields(s ...googleapi.Field) *OrganizationsInstancesAttachmentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -42846,7 +46567,7 @@ func (c *OrganizationsInstancesGetCall) Fields(s ...googleapi.Field) *Organizati // 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 *OrganizationsInstancesGetCall) IfNoneMatch(entityTag string) *OrganizationsInstancesGetCall { +func (c *OrganizationsInstancesAttachmentsGetCall) IfNoneMatch(entityTag string) *OrganizationsInstancesAttachmentsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -42854,21 +46575,21 @@ func (c *OrganizationsInstancesGetCall) IfNoneMatch(entityTag string) *Organizat // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInstancesGetCall) Context(ctx context.Context) *OrganizationsInstancesGetCall { +func (c *OrganizationsInstancesAttachmentsGetCall) Context(ctx context.Context) *OrganizationsInstancesAttachmentsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesGetCall) Header() http.Header { +func (c *OrganizationsInstancesAttachmentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -42894,14 +46615,15 @@ func (c *OrganizationsInstancesGetCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.get" call. -// Exactly one of *GoogleCloudApigeeV1Instance or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudApigeeV1Instance.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.instances.attachments.get" call. +// Exactly one of *GoogleCloudApigeeV1InstanceAttachment or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudApigeeV1InstanceAttachment.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 *OrganizationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Instance, error) { +func (c *OrganizationsInstancesAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1InstanceAttachment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42920,7 +46642,7 @@ func (c *OrganizationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Instance{ + ret := &GoogleCloudApigeeV1InstanceAttachment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -42932,25 +46654,25 @@ func (c *OrganizationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Googl } return ret, nil // { - // "description": "Gets the details for an Apigee runtime instance. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}", + // "description": "Gets an attachment. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/attachments/{attachmentsId}", // "httpMethod": "GET", - // "id": "apigee.organizations.instances.get", + // "id": "apigee.organizations.instances.attachments.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the instance. Use the following structure in your request: `organizations/{org}/instances/{instance}`.", + // "description": "Required. Name of the attachment. Use the following structure in your request: `organizations/{org}/instances/{instance}/attachments/{attachment}`", // "location": "path", - // "pattern": "^organizations/[^/]+/instances/[^/]+$", + // "pattern": "^organizations/[^/]+/instances/[^/]+/attachments/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Instance" + // "$ref": "GoogleCloudApigeeV1InstanceAttachment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -42959,9 +46681,9 @@ func (c *OrganizationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Googl } -// method id "apigee.organizations.instances.list": +// method id "apigee.organizations.instances.attachments.list": -type OrganizationsInstancesListCall struct { +type OrganizationsInstancesAttachmentsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -42970,28 +46692,28 @@ type OrganizationsInstancesListCall struct { header_ http.Header } -// List: Lists all Apigee runtime instances for the organization. -// **Note:** Not supported for Apigee hybrid. +// List: Lists all attachments to an instance. **Note:** Not supported +// for Apigee hybrid. // // - parent: Name of the organization. Use the following structure in -// your request: `organizations/{org}`. -func (r *OrganizationsInstancesService) List(parent string) *OrganizationsInstancesListCall { - c := &OrganizationsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// your request: `organizations/{org}/instances/{instance}`. +func (r *OrganizationsInstancesAttachmentsService) List(parent string) *OrganizationsInstancesAttachmentsListCall { + c := &OrganizationsInstancesAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// instances to return. Defaults to 25. -func (c *OrganizationsInstancesListCall) PageSize(pageSize int64) *OrganizationsInstancesListCall { +// instance attachments to return. Defaults to 25. +func (c *OrganizationsInstancesAttachmentsListCall) PageSize(pageSize int64) *OrganizationsInstancesAttachmentsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token, -// returned from a previous ListInstances call, that you can use to -// retrieve the next page of content. -func (c *OrganizationsInstancesListCall) PageToken(pageToken string) *OrganizationsInstancesListCall { +// returned by a previous ListInstanceAttachments call, that you can use +// to retrieve the next page of content. +func (c *OrganizationsInstancesAttachmentsListCall) PageToken(pageToken string) *OrganizationsInstancesAttachmentsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -42999,7 +46721,7 @@ func (c *OrganizationsInstancesListCall) PageToken(pageToken string) *Organizati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesListCall) Fields(s ...googleapi.Field) *OrganizationsInstancesListCall { +func (c *OrganizationsInstancesAttachmentsListCall) Fields(s ...googleapi.Field) *OrganizationsInstancesAttachmentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -43009,7 +46731,7 @@ func (c *OrganizationsInstancesListCall) Fields(s ...googleapi.Field) *Organizat // 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 *OrganizationsInstancesListCall) IfNoneMatch(entityTag string) *OrganizationsInstancesListCall { +func (c *OrganizationsInstancesAttachmentsListCall) IfNoneMatch(entityTag string) *OrganizationsInstancesAttachmentsListCall { c.ifNoneMatch_ = entityTag return c } @@ -43017,21 +46739,21 @@ func (c *OrganizationsInstancesListCall) IfNoneMatch(entityTag string) *Organiza // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInstancesListCall) Context(ctx context.Context) *OrganizationsInstancesListCall { +func (c *OrganizationsInstancesAttachmentsListCall) Context(ctx context.Context) *OrganizationsInstancesAttachmentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesListCall) Header() http.Header { +func (c *OrganizationsInstancesAttachmentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesAttachmentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -43044,7 +46766,7 @@ func (c *OrganizationsInstancesListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attachments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -43057,16 +46779,16 @@ func (c *OrganizationsInstancesListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.list" call. -// Exactly one of *GoogleCloudApigeeV1ListInstancesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "apigee.organizations.instances.attachments.list" call. +// Exactly one of *GoogleCloudApigeeV1ListInstanceAttachmentsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudApigeeV1ListInstancesResponse.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudApigeeV1ListInstanceAttachmentsResponse.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 *OrganizationsInstancesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListInstancesResponse, error) { +func (c *OrganizationsInstancesAttachmentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListInstanceAttachmentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43085,7 +46807,7 @@ func (c *OrganizationsInstancesListCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListInstancesResponse{ + ret := &GoogleCloudApigeeV1ListInstanceAttachmentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -43097,36 +46819,36 @@ func (c *OrganizationsInstancesListCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Lists all Apigee runtime instances for the organization. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/instances", + // "description": "Lists all attachments to an instance. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/attachments", // "httpMethod": "GET", - // "id": "apigee.organizations.instances.list", + // "id": "apigee.organizations.instances.attachments.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "Maximum number of instances to return. Defaults to 25.", + // "description": "Maximum number of instance attachments to return. Defaults to 25.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token, returned from a previous ListInstances call, that you can use to retrieve the next page of content.", + // "description": "Page token, returned by a previous ListInstanceAttachments call, that you can use to retrieve the next page of content.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}`.", + // "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}/instances/{instance}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/instances/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/instances", + // "path": "v1/{+parent}/attachments", // "response": { - // "$ref": "GoogleCloudApigeeV1ListInstancesResponse" + // "$ref": "GoogleCloudApigeeV1ListInstanceAttachmentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -43138,7 +46860,7 @@ func (c *OrganizationsInstancesListCall) Do(opts ...googleapi.CallOption) (*Goog // 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 *OrganizationsInstancesListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListInstancesResponse) error) error { +func (c *OrganizationsInstancesAttachmentsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListInstanceAttachmentsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -43156,41 +46878,32 @@ func (c *OrganizationsInstancesListCall) Pages(ctx context.Context, f func(*Goog } } -// method id "apigee.organizations.instances.patch": +// method id "apigee.organizations.instances.canaryevaluations.create": -type OrganizationsInstancesPatchCall struct { - s *Service - name string - googlecloudapigeev1instance *GoogleCloudApigeeV1Instance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsInstancesCanaryevaluationsCreateCall struct { + s *Service + parent string + googlecloudapigeev1canaryevaluation *GoogleCloudApigeeV1CanaryEvaluation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an Apigee runtime instance. You can update the fields -// described in NodeConfig. No other fields will be updated. **Note:** -// Not supported for Apigee hybrid. +// Create: Creates a new canary evaluation for an organization. // -// - name: Name of the instance. Use the following structure in your -// request: `organizations/{org}/instances/{instance}`. -func (r *OrganizationsInstancesService) Patch(name string, googlecloudapigeev1instance *GoogleCloudApigeeV1Instance) *OrganizationsInstancesPatchCall { - c := &OrganizationsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1instance = googlecloudapigeev1instance - return c -} - -// UpdateMask sets the optional parameter "updateMask": List of fields -// to be updated. -func (c *OrganizationsInstancesPatchCall) UpdateMask(updateMask string) *OrganizationsInstancesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: Name of the organization. Use the following structure in +// your request: `organizations/{org}/instances/{instance}`. +func (r *OrganizationsInstancesCanaryevaluationsService) Create(parent string, googlecloudapigeev1canaryevaluation *GoogleCloudApigeeV1CanaryEvaluation) *OrganizationsInstancesCanaryevaluationsCreateCall { + c := &OrganizationsInstancesCanaryevaluationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1canaryevaluation = googlecloudapigeev1canaryevaluation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesPatchCall) Fields(s ...googleapi.Field) *OrganizationsInstancesPatchCall { +func (c *OrganizationsInstancesCanaryevaluationsCreateCall) Fields(s ...googleapi.Field) *OrganizationsInstancesCanaryevaluationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -43198,21 +46911,21 @@ func (c *OrganizationsInstancesPatchCall) Fields(s ...googleapi.Field) *Organiza // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInstancesPatchCall) Context(ctx context.Context) *OrganizationsInstancesPatchCall { +func (c *OrganizationsInstancesCanaryevaluationsCreateCall) Context(ctx context.Context) *OrganizationsInstancesCanaryevaluationsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesPatchCall) Header() http.Header { +func (c *OrganizationsInstancesCanaryevaluationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesCanaryevaluationsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -43220,34 +46933,34 @@ func (c *OrganizationsInstancesPatchCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1instance) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1canaryevaluation) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/canaryevaluations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.patch" call. +// Do executes the "apigee.organizations.instances.canaryevaluations.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 *OrganizationsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsInstancesCanaryevaluationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43278,31 +46991,25 @@ func (c *OrganizationsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Updates an Apigee runtime instance. You can update the fields described in NodeConfig. No other fields will be updated. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}", - // "httpMethod": "PATCH", - // "id": "apigee.organizations.instances.patch", + // "description": "Creates a new canary evaluation for an organization.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/canaryevaluations", + // "httpMethod": "POST", + // "id": "apigee.organizations.instances.canaryevaluations.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the instance. Use the following structure in your request: `organizations/{org}/instances/{instance}`.", + // "parent": { + // "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}/instances/{instance}`.", // "location": "path", // "pattern": "^organizations/[^/]+/instances/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "List of fields to be updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/canaryevaluations", // "request": { - // "$ref": "GoogleCloudApigeeV1Instance" + // "$ref": "GoogleCloudApigeeV1CanaryEvaluation" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -43314,70 +47021,222 @@ func (c *OrganizationsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "apigee.organizations.instances.reportStatus": +// method id "apigee.organizations.instances.canaryevaluations.get": -type OrganizationsInstancesReportStatusCall struct { - s *Service - instance string - googlecloudapigeev1reportinstancestatusrequest *GoogleCloudApigeeV1ReportInstanceStatusRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsInstancesCanaryevaluationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ReportStatus: Reports the latest status for a runtime instance. +// Get: Gets a CanaryEvaluation for an organization. // -// - instance: The name of the instance reporting this status. For SaaS -// the request will be rejected if no instance exists under this name. -// Format is organizations/{org}/instances/{instance}. -func (r *OrganizationsInstancesService) ReportStatus(instance string, googlecloudapigeev1reportinstancestatusrequest *GoogleCloudApigeeV1ReportInstanceStatusRequest) *OrganizationsInstancesReportStatusCall { - c := &OrganizationsInstancesReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.instance = instance - c.googlecloudapigeev1reportinstancestatusrequest = googlecloudapigeev1reportinstancestatusrequest +// - name: Name of the CanaryEvaluation. Use the following structure in +// your request: +// `organizations/{org}/instances/*/canaryevaluations/{evaluation}`. +func (r *OrganizationsInstancesCanaryevaluationsService) Get(name string) *OrganizationsInstancesCanaryevaluationsGetCall { + c := &OrganizationsInstancesCanaryevaluationsGetCall{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 *OrganizationsInstancesReportStatusCall) Fields(s ...googleapi.Field) *OrganizationsInstancesReportStatusCall { +func (c *OrganizationsInstancesCanaryevaluationsGetCall) Fields(s ...googleapi.Field) *OrganizationsInstancesCanaryevaluationsGetCall { 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 *OrganizationsInstancesCanaryevaluationsGetCall) IfNoneMatch(entityTag string) *OrganizationsInstancesCanaryevaluationsGetCall { + 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 *OrganizationsInstancesReportStatusCall) Context(ctx context.Context) *OrganizationsInstancesReportStatusCall { +func (c *OrganizationsInstancesCanaryevaluationsGetCall) Context(ctx context.Context) *OrganizationsInstancesCanaryevaluationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesReportStatusCall) Header() http.Header { +func (c *OrganizationsInstancesCanaryevaluationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesReportStatusCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesCanaryevaluationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1reportinstancestatusrequest) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "apigee.organizations.instances.canaryevaluations.get" call. +// Exactly one of *GoogleCloudApigeeV1CanaryEvaluation or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1CanaryEvaluation.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 *OrganizationsInstancesCanaryevaluationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1CanaryEvaluation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1CanaryEvaluation{ + ServerResponse: googleapi.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 CanaryEvaluation for an organization.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/canaryevaluations/{canaryevaluationsId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.instances.canaryevaluations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the CanaryEvaluation. Use the following structure in your request: `organizations/{org}/instances/*/canaryevaluations/{evaluation}`", + // "location": "path", + // "pattern": "^organizations/[^/]+/instances/[^/]+/canaryevaluations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudApigeeV1CanaryEvaluation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.instances.natAddresses.activate": + +type OrganizationsInstancesNatAddressesActivateCall struct { + s *Service + name string + googlecloudapigeev1activatenataddressrequest *GoogleCloudApigeeV1ActivateNatAddressRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Activate: Activates the NAT address. The Apigee instance can now use +// this for Internet egress traffic. **Note:** Not supported for Apigee +// hybrid. +// +// - name: Name of the nat address. Use the following structure in your +// request: +// `organizations/{org}/instances/{instances}/natAddresses/{nataddress} +// ``. +func (r *OrganizationsInstancesNatAddressesService) Activate(name string, googlecloudapigeev1activatenataddressrequest *GoogleCloudApigeeV1ActivateNatAddressRequest) *OrganizationsInstancesNatAddressesActivateCall { + c := &OrganizationsInstancesNatAddressesActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudapigeev1activatenataddressrequest = googlecloudapigeev1activatenataddressrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsInstancesNatAddressesActivateCall) Fields(s ...googleapi.Field) *OrganizationsInstancesNatAddressesActivateCall { + 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 *OrganizationsInstancesNatAddressesActivateCall) Context(ctx context.Context) *OrganizationsInstancesNatAddressesActivateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsInstancesNatAddressesActivateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsInstancesNatAddressesActivateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googlecloudapigeev1activatenataddressrequest) 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, "v1/{+instance}:reportStatus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:activate") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -43385,21 +47244,19 @@ func (c *OrganizationsInstancesReportStatusCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "instance": c.instance, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.reportStatus" call. -// Exactly one of *GoogleCloudApigeeV1ReportInstanceStatusResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ReportInstanceStatusResponse.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 *OrganizationsInstancesReportStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ReportInstanceStatusResponse, error) { +// Do executes the "apigee.organizations.instances.natAddresses.activate" 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 *OrganizationsInstancesNatAddressesActivateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43418,7 +47275,7 @@ func (c *OrganizationsInstancesReportStatusCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ReportInstanceStatusResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -43430,28 +47287,28 @@ func (c *OrganizationsInstancesReportStatusCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Reports the latest status for a runtime instance.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}:reportStatus", + // "description": "Activates the NAT address. The Apigee instance can now use this for Internet egress traffic. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/natAddresses/{natAddressesId}:activate", // "httpMethod": "POST", - // "id": "apigee.organizations.instances.reportStatus", + // "id": "apigee.organizations.instances.natAddresses.activate", // "parameterOrder": [ - // "instance" + // "name" // ], // "parameters": { - // "instance": { - // "description": "The name of the instance reporting this status. For SaaS the request will be rejected if no instance exists under this name. Format is organizations/{org}/instances/{instance}", + // "name": { + // "description": "Required. Name of the nat address. Use the following structure in your request: `organizations/{org}/instances/{instances}/natAddresses/{nataddress}``", // "location": "path", - // "pattern": "^organizations/[^/]+/instances/[^/]+$", + // "pattern": "^organizations/[^/]+/instances/[^/]+/natAddresses/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+instance}:reportStatus", + // "path": "v1/{+name}:activate", // "request": { - // "$ref": "GoogleCloudApigeeV1ReportInstanceStatusRequest" + // "$ref": "GoogleCloudApigeeV1ActivateNatAddressRequest" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ReportInstanceStatusResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -43460,33 +47317,37 @@ func (c *OrganizationsInstancesReportStatusCall) Do(opts ...googleapi.CallOption } -// method id "apigee.organizations.instances.attachments.create": +// method id "apigee.organizations.instances.natAddresses.create": -type OrganizationsInstancesAttachmentsCreateCall struct { - s *Service - parent string - googlecloudapigeev1instanceattachment *GoogleCloudApigeeV1InstanceAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsInstancesNatAddressesCreateCall struct { + s *Service + parent string + googlecloudapigeev1nataddress *GoogleCloudApigeeV1NatAddress + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new attachment of an environment to an instance. -// **Note:** Not supported for Apigee hybrid. +// Create: Creates a NAT address. The address is created in the RESERVED +// state and a static external IP address will be provisioned. At this +// time, the instance will not use this IP address for Internet egress +// traffic. The address can be activated for use once any required +// firewall IP whitelisting has been completed. **Note:** Not supported +// for Apigee hybrid. // // - parent: Name of the instance. Use the following structure in your // request: `organizations/{org}/instances/{instance}`. -func (r *OrganizationsInstancesAttachmentsService) Create(parent string, googlecloudapigeev1instanceattachment *GoogleCloudApigeeV1InstanceAttachment) *OrganizationsInstancesAttachmentsCreateCall { - c := &OrganizationsInstancesAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsInstancesNatAddressesService) Create(parent string, googlecloudapigeev1nataddress *GoogleCloudApigeeV1NatAddress) *OrganizationsInstancesNatAddressesCreateCall { + c := &OrganizationsInstancesNatAddressesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1instanceattachment = googlecloudapigeev1instanceattachment + c.googlecloudapigeev1nataddress = googlecloudapigeev1nataddress return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesAttachmentsCreateCall) Fields(s ...googleapi.Field) *OrganizationsInstancesAttachmentsCreateCall { +func (c *OrganizationsInstancesNatAddressesCreateCall) Fields(s ...googleapi.Field) *OrganizationsInstancesNatAddressesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -43494,21 +47355,21 @@ func (c *OrganizationsInstancesAttachmentsCreateCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInstancesAttachmentsCreateCall) Context(ctx context.Context) *OrganizationsInstancesAttachmentsCreateCall { +func (c *OrganizationsInstancesNatAddressesCreateCall) Context(ctx context.Context) *OrganizationsInstancesNatAddressesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesAttachmentsCreateCall) Header() http.Header { +func (c *OrganizationsInstancesNatAddressesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesAttachmentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesNatAddressesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -43516,14 +47377,14 @@ func (c *OrganizationsInstancesAttachmentsCreateCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1instanceattachment) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1nataddress) 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, "v1/{+parent}/attachments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/natAddresses") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -43536,14 +47397,14 @@ func (c *OrganizationsInstancesAttachmentsCreateCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.attachments.create" call. +// Do executes the "apigee.organizations.instances.natAddresses.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 *OrganizationsInstancesAttachmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsInstancesNatAddressesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43574,25 +47435,25 @@ func (c *OrganizationsInstancesAttachmentsCreateCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Creates a new attachment of an environment to an instance. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/attachments", + // "description": "Creates a NAT address. The address is created in the RESERVED state and a static external IP address will be provisioned. At this time, the instance will not use this IP address for Internet egress traffic. The address can be activated for use once any required firewall IP whitelisting has been completed. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/natAddresses", // "httpMethod": "POST", - // "id": "apigee.organizations.instances.attachments.create", + // "id": "apigee.organizations.instances.natAddresses.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Name of the instance. Use the following structure in your request: `organizations/{org}/instances/{instance}`.", + // "description": "Required. Name of the instance. Use the following structure in your request: `organizations/{org}/instances/{instance}`", // "location": "path", // "pattern": "^organizations/[^/]+/instances/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/attachments", + // "path": "v1/{+parent}/natAddresses", // "request": { - // "$ref": "GoogleCloudApigeeV1InstanceAttachment" + // "$ref": "GoogleCloudApigeeV1NatAddress" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -43604,9 +47465,9 @@ func (c *OrganizationsInstancesAttachmentsCreateCall) Do(opts ...googleapi.CallO } -// method id "apigee.organizations.instances.attachments.delete": +// method id "apigee.organizations.instances.natAddresses.delete": -type OrganizationsInstancesAttachmentsDeleteCall struct { +type OrganizationsInstancesNatAddressesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -43614,14 +47475,16 @@ type OrganizationsInstancesAttachmentsDeleteCall struct { header_ http.Header } -// Delete: Deletes an attachment. **Note:** Not supported for Apigee -// hybrid. +// Delete: Deletes the NAT address. Connections that are actively using +// the address are drained before it is removed. **Note:** Not supported +// for Apigee hybrid. // -// - name: Name of the attachment. Use the following structure in your +// - name: Name of the nat address. Use the following structure in your // request: -// `organizations/{org}/instances/{instance}/attachments/{attachment}`. -func (r *OrganizationsInstancesAttachmentsService) Delete(name string) *OrganizationsInstancesAttachmentsDeleteCall { - c := &OrganizationsInstancesAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `organizations/{org}/instances/{instances}/natAddresses/{nataddress} +// ``. +func (r *OrganizationsInstancesNatAddressesService) Delete(name string) *OrganizationsInstancesNatAddressesDeleteCall { + c := &OrganizationsInstancesNatAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -43629,7 +47492,7 @@ func (r *OrganizationsInstancesAttachmentsService) Delete(name string) *Organiza // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesAttachmentsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInstancesAttachmentsDeleteCall { +func (c *OrganizationsInstancesNatAddressesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInstancesNatAddressesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -43637,21 +47500,21 @@ func (c *OrganizationsInstancesAttachmentsDeleteCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInstancesAttachmentsDeleteCall) Context(ctx context.Context) *OrganizationsInstancesAttachmentsDeleteCall { +func (c *OrganizationsInstancesNatAddressesDeleteCall) Context(ctx context.Context) *OrganizationsInstancesNatAddressesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesAttachmentsDeleteCall) Header() http.Header { +func (c *OrganizationsInstancesNatAddressesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesNatAddressesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -43674,14 +47537,14 @@ func (c *OrganizationsInstancesAttachmentsDeleteCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.attachments.delete" call. +// Do executes the "apigee.organizations.instances.natAddresses.delete" 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 *OrganizationsInstancesAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsInstancesNatAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43712,18 +47575,18 @@ func (c *OrganizationsInstancesAttachmentsDeleteCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Deletes an attachment. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/attachments/{attachmentsId}", + // "description": "Deletes the NAT address. Connections that are actively using the address are drained before it is removed. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/natAddresses/{natAddressesId}", // "httpMethod": "DELETE", - // "id": "apigee.organizations.instances.attachments.delete", + // "id": "apigee.organizations.instances.natAddresses.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the attachment. Use the following structure in your request: `organizations/{org}/instances/{instance}/attachments/{attachment}`.", + // "description": "Required. Name of the nat address. Use the following structure in your request: `organizations/{org}/instances/{instances}/natAddresses/{nataddress}``", // "location": "path", - // "pattern": "^organizations/[^/]+/instances/[^/]+/attachments/[^/]+$", + // "pattern": "^organizations/[^/]+/instances/[^/]+/natAddresses/[^/]+$", // "required": true, // "type": "string" // } @@ -43739,9 +47602,9 @@ func (c *OrganizationsInstancesAttachmentsDeleteCall) Do(opts ...googleapi.CallO } -// method id "apigee.organizations.instances.attachments.get": +// method id "apigee.organizations.instances.natAddresses.get": -type OrganizationsInstancesAttachmentsGetCall struct { +type OrganizationsInstancesNatAddressesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -43750,13 +47613,15 @@ type OrganizationsInstancesAttachmentsGetCall struct { header_ http.Header } -// Get: Gets an attachment. **Note:** Not supported for Apigee hybrid. +// Get: Gets the details of a NAT address. **Note:** Not supported for +// Apigee hybrid. // -// - name: Name of the attachment. Use the following structure in your +// - name: Name of the nat address. Use the following structure in your // request: -// `organizations/{org}/instances/{instance}/attachments/{attachment}`. -func (r *OrganizationsInstancesAttachmentsService) Get(name string) *OrganizationsInstancesAttachmentsGetCall { - c := &OrganizationsInstancesAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `organizations/{org}/instances/{instances}/natAddresses/{nataddress} +// `. +func (r *OrganizationsInstancesNatAddressesService) Get(name string) *OrganizationsInstancesNatAddressesGetCall { + c := &OrganizationsInstancesNatAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -43764,7 +47629,7 @@ func (r *OrganizationsInstancesAttachmentsService) Get(name string) *Organizatio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesAttachmentsGetCall) Fields(s ...googleapi.Field) *OrganizationsInstancesAttachmentsGetCall { +func (c *OrganizationsInstancesNatAddressesGetCall) Fields(s ...googleapi.Field) *OrganizationsInstancesNatAddressesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -43774,7 +47639,7 @@ func (c *OrganizationsInstancesAttachmentsGetCall) Fields(s ...googleapi.Field) // 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 *OrganizationsInstancesAttachmentsGetCall) IfNoneMatch(entityTag string) *OrganizationsInstancesAttachmentsGetCall { +func (c *OrganizationsInstancesNatAddressesGetCall) IfNoneMatch(entityTag string) *OrganizationsInstancesNatAddressesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -43782,21 +47647,21 @@ func (c *OrganizationsInstancesAttachmentsGetCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInstancesAttachmentsGetCall) Context(ctx context.Context) *OrganizationsInstancesAttachmentsGetCall { +func (c *OrganizationsInstancesNatAddressesGetCall) Context(ctx context.Context) *OrganizationsInstancesNatAddressesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesAttachmentsGetCall) Header() http.Header { +func (c *OrganizationsInstancesNatAddressesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesNatAddressesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -43822,15 +47687,14 @@ func (c *OrganizationsInstancesAttachmentsGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.attachments.get" call. -// Exactly one of *GoogleCloudApigeeV1InstanceAttachment or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudApigeeV1InstanceAttachment.ServerResponse.Header or (if a +// Do executes the "apigee.organizations.instances.natAddresses.get" call. +// Exactly one of *GoogleCloudApigeeV1NatAddress or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1NatAddress.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 *OrganizationsInstancesAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1InstanceAttachment, error) { +func (c *OrganizationsInstancesNatAddressesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1NatAddress, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43849,7 +47713,7 @@ func (c *OrganizationsInstancesAttachmentsGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1InstanceAttachment{ + ret := &GoogleCloudApigeeV1NatAddress{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -43861,25 +47725,25 @@ func (c *OrganizationsInstancesAttachmentsGetCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Gets an attachment. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/attachments/{attachmentsId}", + // "description": "Gets the details of a NAT address. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/natAddresses/{natAddressesId}", // "httpMethod": "GET", - // "id": "apigee.organizations.instances.attachments.get", + // "id": "apigee.organizations.instances.natAddresses.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the attachment. Use the following structure in your request: `organizations/{org}/instances/{instance}/attachments/{attachment}`", + // "description": "Required. Name of the nat address. Use the following structure in your request: `organizations/{org}/instances/{instances}/natAddresses/{nataddress}`", // "location": "path", - // "pattern": "^organizations/[^/]+/instances/[^/]+/attachments/[^/]+$", + // "pattern": "^organizations/[^/]+/instances/[^/]+/natAddresses/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1InstanceAttachment" + // "$ref": "GoogleCloudApigeeV1NatAddress" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -43888,9 +47752,9 @@ func (c *OrganizationsInstancesAttachmentsGetCall) Do(opts ...googleapi.CallOpti } -// method id "apigee.organizations.instances.attachments.list": +// method id "apigee.organizations.instances.natAddresses.list": -type OrganizationsInstancesAttachmentsListCall struct { +type OrganizationsInstancesNatAddressesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -43899,28 +47763,28 @@ type OrganizationsInstancesAttachmentsListCall struct { header_ http.Header } -// List: Lists all attachments to an instance. **Note:** Not supported -// for Apigee hybrid. +// List: Lists the NAT addresses for an Apigee instance. **Note:** Not +// supported for Apigee hybrid. // -// - parent: Name of the organization. Use the following structure in -// your request: `organizations/{org}/instances/{instance}`. -func (r *OrganizationsInstancesAttachmentsService) List(parent string) *OrganizationsInstancesAttachmentsListCall { - c := &OrganizationsInstancesAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the instance. Use the following structure in your +// request: `organizations/{org}/instances/{instance}`. +func (r *OrganizationsInstancesNatAddressesService) List(parent string) *OrganizationsInstancesNatAddressesListCall { + c := &OrganizationsInstancesNatAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// instance attachments to return. Defaults to 25. -func (c *OrganizationsInstancesAttachmentsListCall) PageSize(pageSize int64) *OrganizationsInstancesAttachmentsListCall { +// natAddresses to return. Defaults to 25. +func (c *OrganizationsInstancesNatAddressesListCall) PageSize(pageSize int64) *OrganizationsInstancesNatAddressesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token, -// returned by a previous ListInstanceAttachments call, that you can use -// to retrieve the next page of content. -func (c *OrganizationsInstancesAttachmentsListCall) PageToken(pageToken string) *OrganizationsInstancesAttachmentsListCall { +// returned from a previous ListNatAddresses call, that you can use to +// retrieve the next page of content. +func (c *OrganizationsInstancesNatAddressesListCall) PageToken(pageToken string) *OrganizationsInstancesNatAddressesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -43928,7 +47792,7 @@ func (c *OrganizationsInstancesAttachmentsListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesAttachmentsListCall) Fields(s ...googleapi.Field) *OrganizationsInstancesAttachmentsListCall { +func (c *OrganizationsInstancesNatAddressesListCall) Fields(s ...googleapi.Field) *OrganizationsInstancesNatAddressesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -43938,7 +47802,7 @@ func (c *OrganizationsInstancesAttachmentsListCall) Fields(s ...googleapi.Field) // 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 *OrganizationsInstancesAttachmentsListCall) IfNoneMatch(entityTag string) *OrganizationsInstancesAttachmentsListCall { +func (c *OrganizationsInstancesNatAddressesListCall) IfNoneMatch(entityTag string) *OrganizationsInstancesNatAddressesListCall { c.ifNoneMatch_ = entityTag return c } @@ -43946,21 +47810,21 @@ func (c *OrganizationsInstancesAttachmentsListCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInstancesAttachmentsListCall) Context(ctx context.Context) *OrganizationsInstancesAttachmentsListCall { +func (c *OrganizationsInstancesNatAddressesListCall) Context(ctx context.Context) *OrganizationsInstancesNatAddressesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesAttachmentsListCall) Header() http.Header { +func (c *OrganizationsInstancesNatAddressesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesAttachmentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInstancesNatAddressesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -43973,7 +47837,7 @@ func (c *OrganizationsInstancesAttachmentsListCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attachments") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/natAddresses") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -43986,16 +47850,16 @@ func (c *OrganizationsInstancesAttachmentsListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.attachments.list" call. -// Exactly one of *GoogleCloudApigeeV1ListInstanceAttachmentsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "apigee.organizations.instances.natAddresses.list" call. +// Exactly one of *GoogleCloudApigeeV1ListNatAddressesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudApigeeV1ListInstanceAttachmentsResponse.ServerResponse.Hea -// der or (if a response was returned at all) in +// *GoogleCloudApigeeV1ListNatAddressesResponse.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 *OrganizationsInstancesAttachmentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListInstanceAttachmentsResponse, error) { +func (c *OrganizationsInstancesNatAddressesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListNatAddressesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44014,7 +47878,7 @@ func (c *OrganizationsInstancesAttachmentsListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListInstanceAttachmentsResponse{ + ret := &GoogleCloudApigeeV1ListNatAddressesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44026,36 +47890,36 @@ func (c *OrganizationsInstancesAttachmentsListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Lists all attachments to an instance. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/attachments", + // "description": "Lists the NAT addresses for an Apigee instance. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/natAddresses", // "httpMethod": "GET", - // "id": "apigee.organizations.instances.attachments.list", + // "id": "apigee.organizations.instances.natAddresses.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "Maximum number of instance attachments to return. Defaults to 25.", + // "description": "Maximum number of natAddresses to return. Defaults to 25.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token, returned by a previous ListInstanceAttachments call, that you can use to retrieve the next page of content.", + // "description": "Page token, returned from a previous ListNatAddresses call, that you can use to retrieve the next page of content.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}/instances/{instance}`", + // "description": "Required. Name of the instance. Use the following structure in your request: `organizations/{org}/instances/{instance}`", // "location": "path", // "pattern": "^organizations/[^/]+/instances/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/attachments", + // "path": "v1/{+parent}/natAddresses", // "response": { - // "$ref": "GoogleCloudApigeeV1ListInstanceAttachmentsResponse" + // "$ref": "GoogleCloudApigeeV1ListNatAddressesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -44067,7 +47931,7 @@ func (c *OrganizationsInstancesAttachmentsListCall) Do(opts ...googleapi.CallOpt // 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 *OrganizationsInstancesAttachmentsListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListInstanceAttachmentsResponse) error) error { +func (c *OrganizationsInstancesNatAddressesListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListNatAddressesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -44085,32 +47949,33 @@ func (c *OrganizationsInstancesAttachmentsListCall) Pages(ctx context.Context, f } } -// method id "apigee.organizations.instances.canaryevaluations.create": +// method id "apigee.organizations.keyvaluemaps.create": -type OrganizationsInstancesCanaryevaluationsCreateCall struct { - s *Service - parent string - googlecloudapigeev1canaryevaluation *GoogleCloudApigeeV1CanaryEvaluation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsKeyvaluemapsCreateCall struct { + s *Service + parent string + googlecloudapigeev1keyvaluemap *GoogleCloudApigeeV1KeyValueMap + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new canary evaluation for an organization. +// Create: Creates a key value map in an organization. // -// - parent: Name of the organization. Use the following structure in -// your request: `organizations/{org}/instances/{instance}`. -func (r *OrganizationsInstancesCanaryevaluationsService) Create(parent string, googlecloudapigeev1canaryevaluation *GoogleCloudApigeeV1CanaryEvaluation) *OrganizationsInstancesCanaryevaluationsCreateCall { - c := &OrganizationsInstancesCanaryevaluationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of the organization in which to create the key value +// map file. Use the following structure in your request: +// `organizations/{org}`. +func (r *OrganizationsKeyvaluemapsService) Create(parent string, googlecloudapigeev1keyvaluemap *GoogleCloudApigeeV1KeyValueMap) *OrganizationsKeyvaluemapsCreateCall { + c := &OrganizationsKeyvaluemapsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1canaryevaluation = googlecloudapigeev1canaryevaluation + c.googlecloudapigeev1keyvaluemap = googlecloudapigeev1keyvaluemap return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesCanaryevaluationsCreateCall) Fields(s ...googleapi.Field) *OrganizationsInstancesCanaryevaluationsCreateCall { +func (c *OrganizationsKeyvaluemapsCreateCall) Fields(s ...googleapi.Field) *OrganizationsKeyvaluemapsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -44118,21 +47983,21 @@ func (c *OrganizationsInstancesCanaryevaluationsCreateCall) Fields(s ...googleap // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInstancesCanaryevaluationsCreateCall) Context(ctx context.Context) *OrganizationsInstancesCanaryevaluationsCreateCall { +func (c *OrganizationsKeyvaluemapsCreateCall) Context(ctx context.Context) *OrganizationsKeyvaluemapsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesCanaryevaluationsCreateCall) Header() http.Header { +func (c *OrganizationsKeyvaluemapsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesCanaryevaluationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsKeyvaluemapsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -44140,14 +48005,14 @@ func (c *OrganizationsInstancesCanaryevaluationsCreateCall) doRequest(alt string } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1canaryevaluation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1keyvaluemap) 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, "v1/{+parent}/canaryevaluations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keyvaluemaps") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -44160,14 +48025,14 @@ func (c *OrganizationsInstancesCanaryevaluationsCreateCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.canaryevaluations.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 +// Do executes the "apigee.organizations.keyvaluemaps.create" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueMap or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1KeyValueMap.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 *OrganizationsInstancesCanaryevaluationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsKeyvaluemapsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueMap, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44186,7 +48051,7 @@ func (c *OrganizationsInstancesCanaryevaluationsCreateCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1KeyValueMap{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44198,28 +48063,28 @@ func (c *OrganizationsInstancesCanaryevaluationsCreateCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Creates a new canary evaluation for an organization.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/canaryevaluations", + // "description": "Creates a key value map in an organization.", + // "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps", // "httpMethod": "POST", - // "id": "apigee.organizations.instances.canaryevaluations.create", + // "id": "apigee.organizations.keyvaluemaps.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Name of the organization. Use the following structure in your request: `organizations/{org}/instances/{instance}`.", + // "description": "Required. Name of the organization in which to create the key value map file. Use the following structure in your request: `organizations/{org}`", // "location": "path", - // "pattern": "^organizations/[^/]+/instances/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/canaryevaluations", + // "path": "v1/{+parent}/keyvaluemaps", // "request": { - // "$ref": "GoogleCloudApigeeV1CanaryEvaluation" + // "$ref": "GoogleCloudApigeeV1KeyValueMap" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1KeyValueMap" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -44228,24 +48093,22 @@ func (c *OrganizationsInstancesCanaryevaluationsCreateCall) Do(opts ...googleapi } -// method id "apigee.organizations.instances.canaryevaluations.get": +// method id "apigee.organizations.keyvaluemaps.delete": -type OrganizationsInstancesCanaryevaluationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsKeyvaluemapsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a CanaryEvaluation for an organization. +// Delete: Deletes a key value map from an organization. // -// - name: Name of the CanaryEvaluation. Use the following structure in -// your request: -// `organizations/{org}/instances/*/canaryevaluations/{evaluation}`. -func (r *OrganizationsInstancesCanaryevaluationsService) Get(name string) *OrganizationsInstancesCanaryevaluationsGetCall { - c := &OrganizationsInstancesCanaryevaluationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the key value map. Use the following structure in +// your request: `organizations/{org}/keyvaluemaps/{keyvaluemap}`. +func (r *OrganizationsKeyvaluemapsService) Delete(name string) *OrganizationsKeyvaluemapsDeleteCall { + c := &OrganizationsKeyvaluemapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -44253,199 +48116,41 @@ func (r *OrganizationsInstancesCanaryevaluationsService) Get(name string) *Organ // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesCanaryevaluationsGetCall) Fields(s ...googleapi.Field) *OrganizationsInstancesCanaryevaluationsGetCall { +func (c *OrganizationsKeyvaluemapsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsKeyvaluemapsDeleteCall { 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 *OrganizationsInstancesCanaryevaluationsGetCall) IfNoneMatch(entityTag string) *OrganizationsInstancesCanaryevaluationsGetCall { - 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 *OrganizationsInstancesCanaryevaluationsGetCall) Context(ctx context.Context) *OrganizationsInstancesCanaryevaluationsGetCall { +func (c *OrganizationsKeyvaluemapsDeleteCall) Context(ctx context.Context) *OrganizationsKeyvaluemapsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesCanaryevaluationsGetCall) Header() http.Header { +func (c *OrganizationsKeyvaluemapsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesCanaryevaluationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsKeyvaluemapsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - 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 "apigee.organizations.instances.canaryevaluations.get" call. -// Exactly one of *GoogleCloudApigeeV1CanaryEvaluation or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1CanaryEvaluation.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 *OrganizationsInstancesCanaryevaluationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1CanaryEvaluation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudApigeeV1CanaryEvaluation{ - ServerResponse: googleapi.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 CanaryEvaluation for an organization.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/canaryevaluations/{canaryevaluationsId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.instances.canaryevaluations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. Name of the CanaryEvaluation. Use the following structure in your request: `organizations/{org}/instances/*/canaryevaluations/{evaluation}`", - // "location": "path", - // "pattern": "^organizations/[^/]+/instances/[^/]+/canaryevaluations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "GoogleCloudApigeeV1CanaryEvaluation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "apigee.organizations.instances.natAddresses.activate": - -type OrganizationsInstancesNatAddressesActivateCall struct { - s *Service - name string - googlecloudapigeev1activatenataddressrequest *GoogleCloudApigeeV1ActivateNatAddressRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Activate: Activates the NAT address. The Apigee instance can now use -// this for Internet egress traffic. **Note:** Not supported for Apigee -// hybrid. -// -// - name: Name of the nat address. Use the following structure in your -// request: -// `organizations/{org}/instances/{instances}/natAddresses/{nataddress} -// ``. -func (r *OrganizationsInstancesNatAddressesService) Activate(name string, googlecloudapigeev1activatenataddressrequest *GoogleCloudApigeeV1ActivateNatAddressRequest) *OrganizationsInstancesNatAddressesActivateCall { - c := &OrganizationsInstancesNatAddressesActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudapigeev1activatenataddressrequest = googlecloudapigeev1activatenataddressrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *OrganizationsInstancesNatAddressesActivateCall) Fields(s ...googleapi.Field) *OrganizationsInstancesNatAddressesActivateCall { - 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 *OrganizationsInstancesNatAddressesActivateCall) Context(ctx context.Context) *OrganizationsInstancesNatAddressesActivateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *OrganizationsInstancesNatAddressesActivateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsInstancesNatAddressesActivateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - 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.googlecloudapigeev1activatenataddressrequest) - 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, "v1/{+name}:activate") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -44456,14 +48161,14 @@ func (c *OrganizationsInstancesNatAddressesActivateCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.natAddresses.activate" 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 +// Do executes the "apigee.organizations.keyvaluemaps.delete" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueMap or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1KeyValueMap.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 *OrganizationsInstancesNatAddressesActivateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsKeyvaluemapsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueMap, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44482,7 +48187,7 @@ func (c *OrganizationsInstancesNatAddressesActivateCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1KeyValueMap{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44494,28 +48199,25 @@ func (c *OrganizationsInstancesNatAddressesActivateCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Activates the NAT address. The Apigee instance can now use this for Internet egress traffic. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/natAddresses/{natAddressesId}:activate", - // "httpMethod": "POST", - // "id": "apigee.organizations.instances.natAddresses.activate", + // "description": "Deletes a key value map from an organization.", + // "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps/{keyvaluemapsId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.keyvaluemaps.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the nat address. Use the following structure in your request: `organizations/{org}/instances/{instances}/natAddresses/{nataddress}``", + // "description": "Required. Name of the key value map. Use the following structure in your request: `organizations/{org}/keyvaluemaps/{keyvaluemap}`", // "location": "path", - // "pattern": "^organizations/[^/]+/instances/[^/]+/natAddresses/[^/]+$", + // "pattern": "^organizations/[^/]+/keyvaluemaps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:activate", - // "request": { - // "$ref": "GoogleCloudApigeeV1ActivateNatAddressRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1KeyValueMap" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -44524,37 +48226,39 @@ func (c *OrganizationsInstancesNatAddressesActivateCall) Do(opts ...googleapi.Ca } -// method id "apigee.organizations.instances.natAddresses.create": +// method id "apigee.organizations.keyvaluemaps.entries.create": -type OrganizationsInstancesNatAddressesCreateCall struct { - s *Service - parent string - googlecloudapigeev1nataddress *GoogleCloudApigeeV1NatAddress - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsKeyvaluemapsEntriesCreateCall struct { + s *Service + parent string + googlecloudapigeev1keyvalueentry *GoogleCloudApigeeV1KeyValueEntry + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a NAT address. The address is created in the RESERVED -// state and a static external IP address will be provisioned. At this -// time, the instance will not use this IP address for Internet egress -// traffic. The address can be activated for use once any required -// firewall IP whitelisting has been completed. **Note:** Not supported -// for Apigee hybrid. +// Create: Creates key value entries in a key value map scoped to an +// organization, environment, or API proxy. // -// - parent: Name of the instance. Use the following structure in your -// request: `organizations/{org}/instances/{instance}`. -func (r *OrganizationsInstancesNatAddressesService) Create(parent string, googlecloudapigeev1nataddress *GoogleCloudApigeeV1NatAddress) *OrganizationsInstancesNatAddressesCreateCall { - c := &OrganizationsInstancesNatAddressesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Scope as indicated by the URI in which to create the key +// value map entry. Use **one** of the following structures in your +// request: * +// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}` +// . * +// `organizations/{organization}/environments/{environment}/keyvaluemap +// s/{keyvaluemap}` * +// `organizations/{organization}/keyvaluemaps/{keyvaluemap}`. +func (r *OrganizationsKeyvaluemapsEntriesService) Create(parent string, googlecloudapigeev1keyvalueentry *GoogleCloudApigeeV1KeyValueEntry) *OrganizationsKeyvaluemapsEntriesCreateCall { + c := &OrganizationsKeyvaluemapsEntriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1nataddress = googlecloudapigeev1nataddress + c.googlecloudapigeev1keyvalueentry = googlecloudapigeev1keyvalueentry return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesNatAddressesCreateCall) Fields(s ...googleapi.Field) *OrganizationsInstancesNatAddressesCreateCall { +func (c *OrganizationsKeyvaluemapsEntriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsKeyvaluemapsEntriesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -44562,21 +48266,21 @@ func (c *OrganizationsInstancesNatAddressesCreateCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInstancesNatAddressesCreateCall) Context(ctx context.Context) *OrganizationsInstancesNatAddressesCreateCall { +func (c *OrganizationsKeyvaluemapsEntriesCreateCall) Context(ctx context.Context) *OrganizationsKeyvaluemapsEntriesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesNatAddressesCreateCall) Header() http.Header { +func (c *OrganizationsKeyvaluemapsEntriesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesNatAddressesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsKeyvaluemapsEntriesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -44584,14 +48288,14 @@ func (c *OrganizationsInstancesNatAddressesCreateCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1nataddress) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1keyvalueentry) 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, "v1/{+parent}/natAddresses") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -44604,14 +48308,14 @@ func (c *OrganizationsInstancesNatAddressesCreateCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.natAddresses.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 +// Do executes the "apigee.organizations.keyvaluemaps.entries.create" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1KeyValueEntry.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 *OrganizationsInstancesNatAddressesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsKeyvaluemapsEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44630,7 +48334,7 @@ func (c *OrganizationsInstancesNatAddressesCreateCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1KeyValueEntry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44642,28 +48346,28 @@ func (c *OrganizationsInstancesNatAddressesCreateCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Creates a NAT address. The address is created in the RESERVED state and a static external IP address will be provisioned. At this time, the instance will not use this IP address for Internet egress traffic. The address can be activated for use once any required firewall IP whitelisting has been completed. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/natAddresses", + // "description": "Creates key value entries in a key value map scoped to an organization, environment, or API proxy.", + // "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps/{keyvaluemapsId}/entries", // "httpMethod": "POST", - // "id": "apigee.organizations.instances.natAddresses.create", + // "id": "apigee.organizations.keyvaluemaps.entries.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Name of the instance. Use the following structure in your request: `organizations/{org}/instances/{instance}`", + // "description": "Required. Scope as indicated by the URI in which to create the key value map entry. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/instances/[^/]+$", + // "pattern": "^organizations/[^/]+/keyvaluemaps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/natAddresses", + // "path": "v1/{+parent}/entries", // "request": { - // "$ref": "GoogleCloudApigeeV1NatAddress" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -44672,9 +48376,9 @@ func (c *OrganizationsInstancesNatAddressesCreateCall) Do(opts ...googleapi.Call } -// method id "apigee.organizations.instances.natAddresses.delete": +// method id "apigee.organizations.keyvaluemaps.entries.delete": -type OrganizationsInstancesNatAddressesDeleteCall struct { +type OrganizationsKeyvaluemapsEntriesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -44682,16 +48386,23 @@ type OrganizationsInstancesNatAddressesDeleteCall struct { header_ http.Header } -// Delete: Deletes the NAT address. Connections that are actively using -// the address are drained before it is removed. **Note:** Not supported -// for Apigee hybrid. +// Delete: Deletes a key value entry from a key value map scoped to an +// organization, environment, or API proxy. **Note:** After you delete +// the key value entry, the policy consuming the entry will continue to +// function with its cached values for a few minutes. This is expected +// behavior. // -// - name: Name of the nat address. Use the following structure in your -// request: -// `organizations/{org}/instances/{instances}/natAddresses/{nataddress} -// ``. -func (r *OrganizationsInstancesNatAddressesService) Delete(name string) *OrganizationsInstancesNatAddressesDeleteCall { - c := &OrganizationsInstancesNatAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Scope as indicated by the URI in which to delete the key +// value map entry. Use **one** of the following structures in your +// request: * +// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/ +// entries/{entry}`. * +// `organizations/{organization}/environments/{environment}/keyvaluemap +// s/{keyvaluemap}/entries/{entry}` * +// `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{en +// try}`. +func (r *OrganizationsKeyvaluemapsEntriesService) Delete(name string) *OrganizationsKeyvaluemapsEntriesDeleteCall { + c := &OrganizationsKeyvaluemapsEntriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -44699,7 +48410,7 @@ func (r *OrganizationsInstancesNatAddressesService) Delete(name string) *Organiz // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesNatAddressesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInstancesNatAddressesDeleteCall { +func (c *OrganizationsKeyvaluemapsEntriesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsKeyvaluemapsEntriesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -44707,21 +48418,21 @@ func (c *OrganizationsInstancesNatAddressesDeleteCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInstancesNatAddressesDeleteCall) Context(ctx context.Context) *OrganizationsInstancesNatAddressesDeleteCall { +func (c *OrganizationsKeyvaluemapsEntriesDeleteCall) Context(ctx context.Context) *OrganizationsKeyvaluemapsEntriesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesNatAddressesDeleteCall) Header() http.Header { +func (c *OrganizationsKeyvaluemapsEntriesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesNatAddressesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsKeyvaluemapsEntriesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -44744,14 +48455,14 @@ func (c *OrganizationsInstancesNatAddressesDeleteCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.natAddresses.delete" 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 +// Do executes the "apigee.organizations.keyvaluemaps.entries.delete" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1KeyValueEntry.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 *OrganizationsInstancesNatAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsKeyvaluemapsEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44770,7 +48481,7 @@ func (c *OrganizationsInstancesNatAddressesDeleteCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1KeyValueEntry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44782,25 +48493,25 @@ func (c *OrganizationsInstancesNatAddressesDeleteCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Deletes the NAT address. Connections that are actively using the address are drained before it is removed. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/natAddresses/{natAddressesId}", + // "description": "Deletes a key value entry from a key value map scoped to an organization, environment, or API proxy. **Note:** After you delete the key value entry, the policy consuming the entry will continue to function with its cached values for a few minutes. This is expected behavior.", + // "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", // "httpMethod": "DELETE", - // "id": "apigee.organizations.instances.natAddresses.delete", + // "id": "apigee.organizations.keyvaluemaps.entries.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the nat address. Use the following structure in your request: `organizations/{org}/instances/{instances}/natAddresses/{nataddress}``", + // "description": "Required. Scope as indicated by the URI in which to delete the key value map entry. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/entries/{entry}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}/entries/{entry}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{entry}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/instances/[^/]+/natAddresses/[^/]+$", + // "pattern": "^organizations/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -44809,9 +48520,9 @@ func (c *OrganizationsInstancesNatAddressesDeleteCall) Do(opts ...googleapi.Call } -// method id "apigee.organizations.instances.natAddresses.get": +// method id "apigee.organizations.keyvaluemaps.entries.get": -type OrganizationsInstancesNatAddressesGetCall struct { +type OrganizationsKeyvaluemapsEntriesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -44820,15 +48531,20 @@ type OrganizationsInstancesNatAddressesGetCall struct { header_ http.Header } -// Get: Gets the details of a NAT address. **Note:** Not supported for -// Apigee hybrid. +// Get: Get the Key value entry value for org, env or apis scoped Key +// value map. // -// - name: Name of the nat address. Use the following structure in your -// request: -// `organizations/{org}/instances/{instances}/natAddresses/{nataddress} -// `. -func (r *OrganizationsInstancesNatAddressesService) Get(name string) *OrganizationsInstancesNatAddressesGetCall { - c := &OrganizationsInstancesNatAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Scope as indicated by the URI in which to fetch the key value +// map entry/value. Use **one** of the following structures in your +// request: * +// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/ +// entries/{entry}`. * +// `organizations/{organization}/environments/{environment}/keyvaluemap +// s/{keyvaluemap}/entries/{entry}` * +// `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{en +// try}`. +func (r *OrganizationsKeyvaluemapsEntriesService) Get(name string) *OrganizationsKeyvaluemapsEntriesGetCall { + c := &OrganizationsKeyvaluemapsEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -44836,7 +48552,7 @@ func (r *OrganizationsInstancesNatAddressesService) Get(name string) *Organizati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesNatAddressesGetCall) Fields(s ...googleapi.Field) *OrganizationsInstancesNatAddressesGetCall { +func (c *OrganizationsKeyvaluemapsEntriesGetCall) Fields(s ...googleapi.Field) *OrganizationsKeyvaluemapsEntriesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -44846,7 +48562,7 @@ func (c *OrganizationsInstancesNatAddressesGetCall) Fields(s ...googleapi.Field) // 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 *OrganizationsInstancesNatAddressesGetCall) IfNoneMatch(entityTag string) *OrganizationsInstancesNatAddressesGetCall { +func (c *OrganizationsKeyvaluemapsEntriesGetCall) IfNoneMatch(entityTag string) *OrganizationsKeyvaluemapsEntriesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -44854,21 +48570,21 @@ func (c *OrganizationsInstancesNatAddressesGetCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInstancesNatAddressesGetCall) Context(ctx context.Context) *OrganizationsInstancesNatAddressesGetCall { +func (c *OrganizationsKeyvaluemapsEntriesGetCall) Context(ctx context.Context) *OrganizationsKeyvaluemapsEntriesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesNatAddressesGetCall) Header() http.Header { +func (c *OrganizationsKeyvaluemapsEntriesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesNatAddressesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsKeyvaluemapsEntriesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -44894,14 +48610,14 @@ func (c *OrganizationsInstancesNatAddressesGetCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.natAddresses.get" call. -// Exactly one of *GoogleCloudApigeeV1NatAddress or error will be +// Do executes the "apigee.organizations.keyvaluemaps.entries.get" call. +// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1NatAddress.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 +// either *GoogleCloudApigeeV1KeyValueEntry.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 *OrganizationsInstancesNatAddressesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1NatAddress, error) { +func (c *OrganizationsKeyvaluemapsEntriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44920,7 +48636,7 @@ func (c *OrganizationsInstancesNatAddressesGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1NatAddress{ + ret := &GoogleCloudApigeeV1KeyValueEntry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44932,25 +48648,25 @@ func (c *OrganizationsInstancesNatAddressesGetCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Gets the details of a NAT address. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/natAddresses/{natAddressesId}", + // "description": "Get the Key value entry value for org, env or apis scoped Key value map.", + // "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", // "httpMethod": "GET", - // "id": "apigee.organizations.instances.natAddresses.get", + // "id": "apigee.organizations.keyvaluemaps.entries.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the nat address. Use the following structure in your request: `organizations/{org}/instances/{instances}/natAddresses/{nataddress}`", + // "description": "Required. Scope as indicated by the URI in which to fetch the key value map entry/value. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/entries/{entry}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}/entries/{entry}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{entry}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/instances/[^/]+/natAddresses/[^/]+$", + // "pattern": "^organizations/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1NatAddress" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -44959,9 +48675,9 @@ func (c *OrganizationsInstancesNatAddressesGetCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.instances.natAddresses.list": +// method id "apigee.organizations.keyvaluemaps.entries.list": -type OrganizationsInstancesNatAddressesListCall struct { +type OrganizationsKeyvaluemapsEntriesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -44970,28 +48686,34 @@ type OrganizationsInstancesNatAddressesListCall struct { header_ http.Header } -// List: Lists the NAT addresses for an Apigee instance. **Note:** Not -// supported for Apigee hybrid. +// List: Lists key value entries for key values maps scoped to an +// organization, environment, or API proxy. // -// - parent: Name of the instance. Use the following structure in your -// request: `organizations/{org}/instances/{instance}`. -func (r *OrganizationsInstancesNatAddressesService) List(parent string) *OrganizationsInstancesNatAddressesListCall { - c := &OrganizationsInstancesNatAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Scope as indicated by the URI in which to list key value +// maps. Use **one** of the following structures in your request: * +// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}` +// . * +// `organizations/{organization}/environments/{environment}/keyvaluemap +// s/{keyvaluemap}` * +// `organizations/{organization}/keyvaluemaps/{keyvaluemap}`. +func (r *OrganizationsKeyvaluemapsEntriesService) List(parent string) *OrganizationsKeyvaluemapsEntriesListCall { + c := &OrganizationsKeyvaluemapsEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// natAddresses to return. Defaults to 25. -func (c *OrganizationsInstancesNatAddressesListCall) PageSize(pageSize int64) *OrganizationsInstancesNatAddressesListCall { +// key value entries to return. If unspecified, at most 100 entries will +// be returned. +func (c *OrganizationsKeyvaluemapsEntriesListCall) PageSize(pageSize int64) *OrganizationsKeyvaluemapsEntriesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Page token, -// returned from a previous ListNatAddresses call, that you can use to -// retrieve the next page of content. -func (c *OrganizationsInstancesNatAddressesListCall) PageToken(pageToken string) *OrganizationsInstancesNatAddressesListCall { +// PageToken sets the optional parameter "pageToken": Page token. If +// provides, must be a valid key value entry returned from a previous +// call that can be used to retrieve the next page. +func (c *OrganizationsKeyvaluemapsEntriesListCall) PageToken(pageToken string) *OrganizationsKeyvaluemapsEntriesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -44999,7 +48721,7 @@ func (c *OrganizationsInstancesNatAddressesListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInstancesNatAddressesListCall) Fields(s ...googleapi.Field) *OrganizationsInstancesNatAddressesListCall { +func (c *OrganizationsKeyvaluemapsEntriesListCall) Fields(s ...googleapi.Field) *OrganizationsKeyvaluemapsEntriesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -45009,7 +48731,7 @@ func (c *OrganizationsInstancesNatAddressesListCall) Fields(s ...googleapi.Field // 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 *OrganizationsInstancesNatAddressesListCall) IfNoneMatch(entityTag string) *OrganizationsInstancesNatAddressesListCall { +func (c *OrganizationsKeyvaluemapsEntriesListCall) IfNoneMatch(entityTag string) *OrganizationsKeyvaluemapsEntriesListCall { c.ifNoneMatch_ = entityTag return c } @@ -45017,21 +48739,21 @@ func (c *OrganizationsInstancesNatAddressesListCall) IfNoneMatch(entityTag strin // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInstancesNatAddressesListCall) Context(ctx context.Context) *OrganizationsInstancesNatAddressesListCall { +func (c *OrganizationsKeyvaluemapsEntriesListCall) Context(ctx context.Context) *OrganizationsKeyvaluemapsEntriesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInstancesNatAddressesListCall) Header() http.Header { +func (c *OrganizationsKeyvaluemapsEntriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesNatAddressesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsKeyvaluemapsEntriesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -45044,7 +48766,7 @@ func (c *OrganizationsInstancesNatAddressesListCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/natAddresses") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -45057,16 +48779,16 @@ func (c *OrganizationsInstancesNatAddressesListCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.instances.natAddresses.list" call. -// Exactly one of *GoogleCloudApigeeV1ListNatAddressesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "apigee.organizations.keyvaluemaps.entries.list" call. +// Exactly one of *GoogleCloudApigeeV1ListKeyValueEntriesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudApigeeV1ListNatAddressesResponse.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudApigeeV1ListKeyValueEntriesResponse.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 *OrganizationsInstancesNatAddressesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListNatAddressesResponse, error) { +func (c *OrganizationsKeyvaluemapsEntriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListKeyValueEntriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45085,7 +48807,7 @@ func (c *OrganizationsInstancesNatAddressesListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListNatAddressesResponse{ + ret := &GoogleCloudApigeeV1ListKeyValueEntriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45097,36 +48819,36 @@ func (c *OrganizationsInstancesNatAddressesListCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Lists the NAT addresses for an Apigee instance. **Note:** Not supported for Apigee hybrid.", - // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}/natAddresses", + // "description": "Lists key value entries for key values maps scoped to an organization, environment, or API proxy.", + // "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps/{keyvaluemapsId}/entries", // "httpMethod": "GET", - // "id": "apigee.organizations.instances.natAddresses.list", + // "id": "apigee.organizations.keyvaluemaps.entries.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "Maximum number of natAddresses to return. Defaults to 25.", + // "description": "Optional. Maximum number of key value entries to return. If unspecified, at most 100 entries will be returned.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token, returned from a previous ListNatAddresses call, that you can use to retrieve the next page of content.", + // "description": "Optional. Page token. If provides, must be a valid key value entry returned from a previous call that can be used to retrieve the next page.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Name of the instance. Use the following structure in your request: `organizations/{org}/instances/{instance}`", + // "description": "Required. Scope as indicated by the URI in which to list key value maps. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/instances/[^/]+$", + // "pattern": "^organizations/[^/]+/keyvaluemaps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/natAddresses", + // "path": "v1/{+parent}/entries", // "response": { - // "$ref": "GoogleCloudApigeeV1ListNatAddressesResponse" + // "$ref": "GoogleCloudApigeeV1ListKeyValueEntriesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -45138,7 +48860,7 @@ func (c *OrganizationsInstancesNatAddressesListCall) Do(opts ...googleapi.CallOp // 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 *OrganizationsInstancesNatAddressesListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListNatAddressesResponse) error) error { +func (c *OrganizationsKeyvaluemapsEntriesListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListKeyValueEntriesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -45156,90 +48878,97 @@ func (c *OrganizationsInstancesNatAddressesListCall) Pages(ctx context.Context, } } -// method id "apigee.organizations.keyvaluemaps.create": +// method id "apigee.organizations.operations.get": -type OrganizationsKeyvaluemapsCreateCall struct { - s *Service - parent string - googlecloudapigeev1keyvaluemap *GoogleCloudApigeeV1KeyValueMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a key value map in an organization. +// 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. // -// - parent: Name of the organization in which to create the key value -// map file. Use the following structure in your request: -// `organizations/{org}`. -func (r *OrganizationsKeyvaluemapsService) Create(parent string, googlecloudapigeev1keyvaluemap *GoogleCloudApigeeV1KeyValueMap) *OrganizationsKeyvaluemapsCreateCall { - c := &OrganizationsKeyvaluemapsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1keyvaluemap = googlecloudapigeev1keyvaluemap +// - name: The name of the operation resource. +func (r *OrganizationsOperationsService) Get(name string) *OrganizationsOperationsGetCall { + c := &OrganizationsOperationsGetCall{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 *OrganizationsKeyvaluemapsCreateCall) Fields(s ...googleapi.Field) *OrganizationsKeyvaluemapsCreateCall { +func (c *OrganizationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsOperationsGetCall { 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 *OrganizationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsOperationsGetCall { + 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 *OrganizationsKeyvaluemapsCreateCall) Context(ctx context.Context) *OrganizationsKeyvaluemapsCreateCall { +func (c *OrganizationsOperationsGetCall) Context(ctx context.Context) *OrganizationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsKeyvaluemapsCreateCall) Header() http.Header { +func (c *OrganizationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsKeyvaluemapsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1keyvaluemap) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keyvaluemaps") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.keyvaluemaps.create" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueMap or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueMap.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "apigee.organizations.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 *OrganizationsKeyvaluemapsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueMap, error) { +func (c *OrganizationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45258,7 +48987,7 @@ func (c *OrganizationsKeyvaluemapsCreateCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueMap{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45270,28 +48999,25 @@ func (c *OrganizationsKeyvaluemapsCreateCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Creates a key value map in an organization.", - // "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps", - // "httpMethod": "POST", - // "id": "apigee.organizations.keyvaluemaps.create", + // "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": "v1/organizations/{organizationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Name of the organization in which to create the key value map file. Use the following structure in your request: `organizations/{org}`", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/keyvaluemaps", - // "request": { - // "$ref": "GoogleCloudApigeeV1KeyValueMap" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueMap" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -45300,64 +49026,107 @@ func (c *OrganizationsKeyvaluemapsCreateCall) Do(opts ...googleapi.CallOption) ( } -// method id "apigee.organizations.keyvaluemaps.delete": +// method id "apigee.organizations.operations.list": -type OrganizationsKeyvaluemapsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a key value map from an organization. +// 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 allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. // -// - name: Name of the key value map. Use the following structure in -// your request: `organizations/{org}/keyvaluemaps/{keyvaluemap}`. -func (r *OrganizationsKeyvaluemapsService) Delete(name string) *OrganizationsKeyvaluemapsDeleteCall { - c := &OrganizationsKeyvaluemapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *OrganizationsOperationsService) List(name string) *OrganizationsOperationsListCall { + c := &OrganizationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OrganizationsOperationsListCall) Filter(filter string) *OrganizationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OrganizationsOperationsListCall) PageSize(pageSize int64) *OrganizationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OrganizationsOperationsListCall) PageToken(pageToken string) *OrganizationsOperationsListCall { + 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 *OrganizationsKeyvaluemapsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsKeyvaluemapsDeleteCall { +func (c *OrganizationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsOperationsListCall { 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 *OrganizationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsOperationsListCall { + 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 *OrganizationsKeyvaluemapsDeleteCall) Context(ctx context.Context) *OrganizationsKeyvaluemapsDeleteCall { +func (c *OrganizationsOperationsListCall) Context(ctx context.Context) *OrganizationsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsKeyvaluemapsDeleteCall) Header() http.Header { +func (c *OrganizationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsKeyvaluemapsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -45368,14 +49137,15 @@ func (c *OrganizationsKeyvaluemapsDeleteCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.keyvaluemaps.delete" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueMap or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueMap.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 +// Do executes the "apigee.organizations.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 *OrganizationsKeyvaluemapsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueMap, error) { +func (c *OrganizationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45394,7 +49164,7 @@ func (c *OrganizationsKeyvaluemapsDeleteCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueMap{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45406,25 +49176,41 @@ func (c *OrganizationsKeyvaluemapsDeleteCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Deletes a key value map from an organization.", - // "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps/{keyvaluemapsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.keyvaluemaps.delete", + // "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 allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/organizations/{organizationsId}/operations", + // "httpMethod": "GET", + // "id": "apigee.organizations.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. Name of the key value map. Use the following structure in your request: `organizations/{org}/keyvaluemaps/{keyvaluemap}`", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^organizations/[^/]+/keyvaluemaps/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "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": "v1/{+name}", + // "path": "v1/{+name}/operations", // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueMap" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -45433,96 +49219,229 @@ func (c *OrganizationsKeyvaluemapsDeleteCall) Do(opts ...googleapi.CallOption) ( } -// method id "apigee.organizations.keyvaluemaps.entries.create": +// 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 *OrganizationsOperationsListCall) 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) + } +} -type OrganizationsKeyvaluemapsEntriesCreateCall struct { - s *Service - parent string - googlecloudapigeev1keyvalueentry *GoogleCloudApigeeV1KeyValueEntry - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "apigee.organizations.optimizedHostStats.get": + +type OrganizationsOptimizedHostStatsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates key value entries in a key value map scoped to an -// organization, environment, or API proxy. +// Get: Similar to GetHostStats except that the response is less +// verbose. // -// - parent: Scope as indicated by the URI in which to create the key -// value map entry. Use **one** of the following structures in your -// request: * -// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}` -// . * -// `organizations/{organization}/environments/{environment}/keyvaluemap -// s/{keyvaluemap}` * -// `organizations/{organization}/keyvaluemaps/{keyvaluemap}`. -func (r *OrganizationsKeyvaluemapsEntriesService) Create(parent string, googlecloudapigeev1keyvalueentry *GoogleCloudApigeeV1KeyValueEntry) *OrganizationsKeyvaluemapsEntriesCreateCall { - c := &OrganizationsKeyvaluemapsEntriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudapigeev1keyvalueentry = googlecloudapigeev1keyvalueentry +// - name: Resource name for which the interactive query will be +// executed. Use the following format in your request: +// `organizations/{organization_id}/optimizedHostStats/{dimensions}` +// Dimensions let you view metrics in meaningful groupings, such as +// `apiproxy`, `target_host`. The value of dimensions should be a +// comma-separated list as shown below: +// `organizations/{org}/optimizedHostStats/apiproxy,request_verb`. +func (r *OrganizationsOptimizedHostStatsService) Get(name string) *OrganizationsOptimizedHostStatsGetCall { + c := &OrganizationsOptimizedHostStatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Accuracy sets the optional parameter "accuracy": No longer used by +// Apigee. Supported for backwards compatibility. +func (c *OrganizationsOptimizedHostStatsGetCall) Accuracy(accuracy string) *OrganizationsOptimizedHostStatsGetCall { + c.urlParams_.Set("accuracy", accuracy) + return c +} + +// EnvgroupHostname sets the optional parameter "envgroupHostname": +// Required. Hostname for which the interactive query will be executed. +func (c *OrganizationsOptimizedHostStatsGetCall) EnvgroupHostname(envgroupHostname string) *OrganizationsOptimizedHostStatsGetCall { + c.urlParams_.Set("envgroupHostname", envgroupHostname) + return c +} + +// Filter sets the optional parameter "filter": Filter that enables you +// to drill-down on specific dimension values. +func (c *OrganizationsOptimizedHostStatsGetCall) Filter(filter string) *OrganizationsOptimizedHostStatsGetCall { + c.urlParams_.Set("filter", filter) + return c +} + +// Limit sets the optional parameter "limit": Maximum number of result +// items to return. The default and maximum value that can be returned +// is 14400. +func (c *OrganizationsOptimizedHostStatsGetCall) Limit(limit string) *OrganizationsOptimizedHostStatsGetCall { + c.urlParams_.Set("limit", limit) + return c +} + +// Offset sets the optional parameter "offset": Offset value. Use +// `offset` with `limit` to enable pagination of results. For example, +// to display results 11-20, set limit to `10` and offset to `10`. +func (c *OrganizationsOptimizedHostStatsGetCall) Offset(offset string) *OrganizationsOptimizedHostStatsGetCall { + c.urlParams_.Set("offset", offset) + return c +} + +// Realtime sets the optional parameter "realtime": No longer used by +// Apigee. Supported for backwards compatibility. +func (c *OrganizationsOptimizedHostStatsGetCall) Realtime(realtime bool) *OrganizationsOptimizedHostStatsGetCall { + c.urlParams_.Set("realtime", fmt.Sprint(realtime)) + return c +} + +// Select sets the optional parameter "select": Required. +// Comma-separated list of metrics. For example: +// `sum(message_count),sum(error_count)` +func (c *OrganizationsOptimizedHostStatsGetCall) Select(select_ string) *OrganizationsOptimizedHostStatsGetCall { + c.urlParams_.Set("select", select_) + return c +} + +// Sort sets the optional parameter "sort": Flag that specifies whether +// the sort order should be ascending or descending. Valid values +// include `DESC` and `ASC`. +func (c *OrganizationsOptimizedHostStatsGetCall) Sort(sort string) *OrganizationsOptimizedHostStatsGetCall { + c.urlParams_.Set("sort", sort) + return c +} + +// Sortby sets the optional parameter "sortby": Comma-separated list of +// columns used to sort the final result. +func (c *OrganizationsOptimizedHostStatsGetCall) Sortby(sortby string) *OrganizationsOptimizedHostStatsGetCall { + c.urlParams_.Set("sortby", sortby) + return c +} + +// TimeRange sets the optional parameter "timeRange": Required. Time +// interval for the interactive query. Time range is specified in GMT as +// `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59`. +func (c *OrganizationsOptimizedHostStatsGetCall) TimeRange(timeRange string) *OrganizationsOptimizedHostStatsGetCall { + c.urlParams_.Set("timeRange", timeRange) + return c +} + +// TimeUnit sets the optional parameter "timeUnit": Granularity of +// metrics returned. Valid values include: `second`, `minute`, `hour`, +// `day`, `week`, or `month`. +func (c *OrganizationsOptimizedHostStatsGetCall) TimeUnit(timeUnit string) *OrganizationsOptimizedHostStatsGetCall { + c.urlParams_.Set("timeUnit", timeUnit) + return c +} + +// Topk sets the optional parameter "topk": Top number of results to +// return. For example, to return the top 5 results, set `topk=5`. +func (c *OrganizationsOptimizedHostStatsGetCall) Topk(topk string) *OrganizationsOptimizedHostStatsGetCall { + c.urlParams_.Set("topk", topk) + return c +} + +// TsAscending sets the optional parameter "tsAscending": Flag that +// specifies whether to list timestamps in ascending (`true`) or +// descending (`false`) order. Apigee recommends that you set this value +// to `true` if you are using `sortby` with `sort=DESC`. +func (c *OrganizationsOptimizedHostStatsGetCall) TsAscending(tsAscending bool) *OrganizationsOptimizedHostStatsGetCall { + c.urlParams_.Set("tsAscending", fmt.Sprint(tsAscending)) + return c +} + +// Tzo sets the optional parameter "tzo": Timezone offset value. +func (c *OrganizationsOptimizedHostStatsGetCall) Tzo(tzo string) *OrganizationsOptimizedHostStatsGetCall { + c.urlParams_.Set("tzo", tzo) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsKeyvaluemapsEntriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsKeyvaluemapsEntriesCreateCall { +func (c *OrganizationsOptimizedHostStatsGetCall) Fields(s ...googleapi.Field) *OrganizationsOptimizedHostStatsGetCall { 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 *OrganizationsOptimizedHostStatsGetCall) IfNoneMatch(entityTag string) *OrganizationsOptimizedHostStatsGetCall { + 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 *OrganizationsKeyvaluemapsEntriesCreateCall) Context(ctx context.Context) *OrganizationsKeyvaluemapsEntriesCreateCall { +func (c *OrganizationsOptimizedHostStatsGetCall) Context(ctx context.Context) *OrganizationsOptimizedHostStatsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsKeyvaluemapsEntriesCreateCall) Header() http.Header { +func (c *OrganizationsOptimizedHostStatsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsKeyvaluemapsEntriesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsOptimizedHostStatsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1keyvalueentry) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.keyvaluemaps.entries.create" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be +// Do executes the "apigee.organizations.optimizedHostStats.get" call. +// Exactly one of *GoogleCloudApigeeV1OptimizedStats or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueEntry.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 *OrganizationsKeyvaluemapsEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { +// either *GoogleCloudApigeeV1OptimizedStats.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 *OrganizationsOptimizedHostStatsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1OptimizedStats, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45541,7 +49460,7 @@ func (c *OrganizationsKeyvaluemapsEntriesCreateCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueEntry{ + ret := &GoogleCloudApigeeV1OptimizedStats{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45553,28 +49472,95 @@ func (c *OrganizationsKeyvaluemapsEntriesCreateCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Creates key value entries in a key value map scoped to an organization, environment, or API proxy.", - // "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps/{keyvaluemapsId}/entries", - // "httpMethod": "POST", - // "id": "apigee.organizations.keyvaluemaps.entries.create", + // "description": "Similar to GetHostStats except that the response is less verbose.", + // "flatPath": "v1/organizations/{organizationsId}/optimizedHostStats/{optimizedHostStatsId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.optimizedHostStats.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Scope as indicated by the URI in which to create the key value map entry. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", + // "accuracy": { + // "description": "No longer used by Apigee. Supported for backwards compatibility.", + // "location": "query", + // "type": "string" + // }, + // "envgroupHostname": { + // "description": "Required. Hostname for which the interactive query will be executed.", + // "location": "query", + // "type": "string" + // }, + // "filter": { + // "description": "Filter that enables you to drill-down on specific dimension values.", + // "location": "query", + // "type": "string" + // }, + // "limit": { + // "description": "Maximum number of result items to return. The default and maximum value that can be returned is 14400.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. Resource name for which the interactive query will be executed. Use the following format in your request: `organizations/{organization_id}/optimizedHostStats/{dimensions}` Dimensions let you view metrics in meaningful groupings, such as `apiproxy`, `target_host`. The value of dimensions should be a comma-separated list as shown below: `organizations/{org}/optimizedHostStats/apiproxy,request_verb`", // "location": "path", - // "pattern": "^organizations/[^/]+/keyvaluemaps/[^/]+$", + // "pattern": "^organizations/[^/]+/optimizedHostStats/.*$", // "required": true, // "type": "string" + // }, + // "offset": { + // "description": "Offset value. Use `offset` with `limit` to enable pagination of results. For example, to display results 11-20, set limit to `10` and offset to `10`.", + // "location": "query", + // "type": "string" + // }, + // "realtime": { + // "description": "No longer used by Apigee. Supported for backwards compatibility.", + // "location": "query", + // "type": "boolean" + // }, + // "select": { + // "description": "Required. Comma-separated list of metrics. For example: `sum(message_count),sum(error_count)`", + // "location": "query", + // "type": "string" + // }, + // "sort": { + // "description": "Flag that specifies whether the sort order should be ascending or descending. Valid values include `DESC` and `ASC`.", + // "location": "query", + // "type": "string" + // }, + // "sortby": { + // "description": "Comma-separated list of columns used to sort the final result.", + // "location": "query", + // "type": "string" + // }, + // "timeRange": { + // "description": "Required. Time interval for the interactive query. Time range is specified in GMT as `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59`.", + // "location": "query", + // "type": "string" + // }, + // "timeUnit": { + // "description": "Granularity of metrics returned. Valid values include: `second`, `minute`, `hour`, `day`, `week`, or `month`.", + // "location": "query", + // "type": "string" + // }, + // "topk": { + // "description": "Top number of results to return. For example, to return the top 5 results, set `topk=5`.", + // "location": "query", + // "type": "string" + // }, + // "tsAscending": { + // "description": "Flag that specifies whether to list timestamps in ascending (`true`) or descending (`false`) order. Apigee recommends that you set this value to `true` if you are using `sortby` with `sort=DESC`.", + // "location": "query", + // "type": "boolean" + // }, + // "tzo": { + // "description": "Timezone offset value.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/entries", - // "request": { - // "$ref": "GoogleCloudApigeeV1KeyValueEntry" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueEntry" + // "$ref": "GoogleCloudApigeeV1OptimizedStats" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -45583,41 +49569,40 @@ func (c *OrganizationsKeyvaluemapsEntriesCreateCall) Do(opts ...googleapi.CallOp } -// method id "apigee.organizations.keyvaluemaps.entries.delete": +// method id "apigee.organizations.reports.create": -type OrganizationsKeyvaluemapsEntriesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsReportsCreateCall struct { + s *Service + parent string + googlecloudapigeev1customreport *GoogleCloudApigeeV1CustomReport + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a key value entry from a key value map scoped to an -// organization, environment, or API proxy. **Note:** After you delete -// the key value entry, the policy consuming the entry will continue to -// function with its cached values for a few minutes. This is expected -// behavior. +// Create: Creates a Custom Report for an Organization. A Custom Report +// provides Apigee Customers to create custom dashboards in addition to +// the standard dashboards which are provided. The Custom Report in its +// simplest form contains specifications about metrics, dimensions and +// filters. It is important to note that the custom report by itself +// does not provide an executable entity. The Edge UI converts the +// custom report definition into an analytics query and displays the +// result in a chart. // -// - name: Scope as indicated by the URI in which to delete the key -// value map entry. Use **one** of the following structures in your -// request: * -// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/ -// entries/{entry}`. * -// `organizations/{organization}/environments/{environment}/keyvaluemap -// s/{keyvaluemap}/entries/{entry}` * -// `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{en -// try}`. -func (r *OrganizationsKeyvaluemapsEntriesService) Delete(name string) *OrganizationsKeyvaluemapsEntriesDeleteCall { - c := &OrganizationsKeyvaluemapsEntriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent organization name under which the Custom Report +// will be created. Must be of the form: +// `organizations/{organization_id}/reports`. +func (r *OrganizationsReportsService) Create(parent string, googlecloudapigeev1customreport *GoogleCloudApigeeV1CustomReport) *OrganizationsReportsCreateCall { + c := &OrganizationsReportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudapigeev1customreport = googlecloudapigeev1customreport return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsKeyvaluemapsEntriesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsKeyvaluemapsEntriesDeleteCall { +func (c *OrganizationsReportsCreateCall) Fields(s ...googleapi.Field) *OrganizationsReportsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -45625,21 +49610,21 @@ func (c *OrganizationsKeyvaluemapsEntriesDeleteCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsKeyvaluemapsEntriesDeleteCall) Context(ctx context.Context) *OrganizationsKeyvaluemapsEntriesDeleteCall { +func (c *OrganizationsReportsCreateCall) Context(ctx context.Context) *OrganizationsReportsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsKeyvaluemapsEntriesDeleteCall) Header() http.Header { +func (c *OrganizationsReportsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsKeyvaluemapsEntriesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsReportsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -45647,29 +49632,34 @@ func (c *OrganizationsKeyvaluemapsEntriesDeleteCall) doRequest(alt string) (*htt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1customreport) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/reports") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.keyvaluemaps.entries.delete" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be +// Do executes the "apigee.organizations.reports.create" call. +// Exactly one of *GoogleCloudApigeeV1CustomReport or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueEntry.ServerResponse.Header or (if +// either *GoogleCloudApigeeV1CustomReport.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 *OrganizationsKeyvaluemapsEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { +func (c *OrganizationsReportsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1CustomReport, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45688,7 +49678,7 @@ func (c *OrganizationsKeyvaluemapsEntriesDeleteCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueEntry{ + ret := &GoogleCloudApigeeV1CustomReport{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45700,25 +49690,28 @@ func (c *OrganizationsKeyvaluemapsEntriesDeleteCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Deletes a key value entry from a key value map scoped to an organization, environment, or API proxy. **Note:** After you delete the key value entry, the policy consuming the entry will continue to function with its cached values for a few minutes. This is expected behavior.", - // "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.keyvaluemaps.entries.delete", + // "description": "Creates a Custom Report for an Organization. A Custom Report provides Apigee Customers to create custom dashboards in addition to the standard dashboards which are provided. The Custom Report in its simplest form contains specifications about metrics, dimensions and filters. It is important to note that the custom report by itself does not provide an executable entity. The Edge UI converts the custom report definition into an analytics query and displays the result in a chart.", + // "flatPath": "v1/organizations/{organizationsId}/reports", + // "httpMethod": "POST", + // "id": "apigee.organizations.reports.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Scope as indicated by the URI in which to delete the key value map entry. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/entries/{entry}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}/entries/{entry}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{entry}`.", + // "parent": { + // "description": "Required. The parent organization name under which the Custom Report will be created. Must be of the form: `organizations/{organization_id}/reports`", // "location": "path", - // "pattern": "^organizations/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/reports", + // "request": { + // "$ref": "GoogleCloudApigeeV1CustomReport" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueEntry" + // "$ref": "GoogleCloudApigeeV1CustomReport" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -45727,31 +49720,22 @@ func (c *OrganizationsKeyvaluemapsEntriesDeleteCall) Do(opts ...googleapi.CallOp } -// method id "apigee.organizations.keyvaluemaps.entries.get": +// method id "apigee.organizations.reports.delete": -type OrganizationsKeyvaluemapsEntriesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsReportsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Get the Key value entry value for org, env or apis scoped Key -// value map. +// Delete: Deletes an existing custom report definition // -// - name: Scope as indicated by the URI in which to fetch the key value -// map entry/value. Use **one** of the following structures in your -// request: * -// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/ -// entries/{entry}`. * -// `organizations/{organization}/environments/{environment}/keyvaluemap -// s/{keyvaluemap}/entries/{entry}` * -// `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{en -// try}`. -func (r *OrganizationsKeyvaluemapsEntriesService) Get(name string) *OrganizationsKeyvaluemapsEntriesGetCall { - c := &OrganizationsKeyvaluemapsEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Custom Report name of the form: +// `organizations/{organization_id}/reports/{report_name}`. +func (r *OrganizationsReportsService) Delete(name string) *OrganizationsReportsDeleteCall { + c := &OrganizationsReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -45759,72 +49743,61 @@ func (r *OrganizationsKeyvaluemapsEntriesService) Get(name string) *Organization // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsKeyvaluemapsEntriesGetCall) Fields(s ...googleapi.Field) *OrganizationsKeyvaluemapsEntriesGetCall { +func (c *OrganizationsReportsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsReportsDeleteCall { 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 *OrganizationsKeyvaluemapsEntriesGetCall) IfNoneMatch(entityTag string) *OrganizationsKeyvaluemapsEntriesGetCall { - 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 *OrganizationsKeyvaluemapsEntriesGetCall) Context(ctx context.Context) *OrganizationsKeyvaluemapsEntriesGetCall { +func (c *OrganizationsReportsDeleteCall) Context(ctx context.Context) *OrganizationsReportsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsKeyvaluemapsEntriesGetCall) Header() http.Header { +func (c *OrganizationsReportsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsKeyvaluemapsEntriesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsReportsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "apigee.organizations.keyvaluemaps.entries.get" call. -// Exactly one of *GoogleCloudApigeeV1KeyValueEntry or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1KeyValueEntry.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 *OrganizationsKeyvaluemapsEntriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { + 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 "apigee.organizations.reports.delete" call. +// Exactly one of *GoogleCloudApigeeV1DeleteCustomReportResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1DeleteCustomReportResponse.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 *OrganizationsReportsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeleteCustomReportResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45843,7 +49816,7 @@ func (c *OrganizationsKeyvaluemapsEntriesGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1KeyValueEntry{ + ret := &GoogleCloudApigeeV1DeleteCustomReportResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45855,25 +49828,25 @@ func (c *OrganizationsKeyvaluemapsEntriesGetCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Get the Key value entry value for org, env or apis scoped Key value map.", - // "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.keyvaluemaps.entries.get", + // "description": "Deletes an existing custom report definition", + // "flatPath": "v1/organizations/{organizationsId}/reports/{reportsId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.reports.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Scope as indicated by the URI in which to fetch the key value map entry/value. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}/entries/{entry}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}/entries/{entry}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}/entries/{entry}`.", + // "description": "Required. Custom Report name of the form: `organizations/{organization_id}/reports/{report_name}`", // "location": "path", - // "pattern": "^organizations/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", + // "pattern": "^organizations/[^/]+/reports/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueEntry" + // "$ref": "GoogleCloudApigeeV1DeleteCustomReportResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -45882,53 +49855,31 @@ func (c *OrganizationsKeyvaluemapsEntriesGetCall) Do(opts ...googleapi.CallOptio } -// method id "apigee.organizations.keyvaluemaps.entries.list": +// method id "apigee.organizations.reports.get": -type OrganizationsKeyvaluemapsEntriesListCall struct { +type OrganizationsReportsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists key value entries for key values maps scoped to an -// organization, environment, or API proxy. +// Get: Retrieve a custom report definition. // -// - parent: Scope as indicated by the URI in which to list key value -// maps. Use **one** of the following structures in your request: * -// `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}` -// . * -// `organizations/{organization}/environments/{environment}/keyvaluemap -// s/{keyvaluemap}` * -// `organizations/{organization}/keyvaluemaps/{keyvaluemap}`. -func (r *OrganizationsKeyvaluemapsEntriesService) List(parent string) *OrganizationsKeyvaluemapsEntriesListCall { - c := &OrganizationsKeyvaluemapsEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// key value entries to return. If unspecified, at most 100 entries will -// be returned. -func (c *OrganizationsKeyvaluemapsEntriesListCall) PageSize(pageSize int64) *OrganizationsKeyvaluemapsEntriesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token. If -// provides, must be a valid key value entry returned from a previous -// call that can be used to retrieve the next page. -func (c *OrganizationsKeyvaluemapsEntriesListCall) PageToken(pageToken string) *OrganizationsKeyvaluemapsEntriesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Custom Report name of the form: +// `organizations/{organization_id}/reports/{report_name}`. +func (r *OrganizationsReportsService) Get(name string) *OrganizationsReportsGetCall { + c := &OrganizationsReportsGetCall{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 *OrganizationsKeyvaluemapsEntriesListCall) Fields(s ...googleapi.Field) *OrganizationsKeyvaluemapsEntriesListCall { +func (c *OrganizationsReportsGetCall) Fields(s ...googleapi.Field) *OrganizationsReportsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -45938,7 +49889,7 @@ func (c *OrganizationsKeyvaluemapsEntriesListCall) Fields(s ...googleapi.Field) // 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 *OrganizationsKeyvaluemapsEntriesListCall) IfNoneMatch(entityTag string) *OrganizationsKeyvaluemapsEntriesListCall { +func (c *OrganizationsReportsGetCall) IfNoneMatch(entityTag string) *OrganizationsReportsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -45946,21 +49897,21 @@ func (c *OrganizationsKeyvaluemapsEntriesListCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsKeyvaluemapsEntriesListCall) Context(ctx context.Context) *OrganizationsKeyvaluemapsEntriesListCall { +func (c *OrganizationsReportsGetCall) Context(ctx context.Context) *OrganizationsReportsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsKeyvaluemapsEntriesListCall) Header() http.Header { +func (c *OrganizationsReportsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsKeyvaluemapsEntriesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsReportsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -45973,7 +49924,7 @@ func (c *OrganizationsKeyvaluemapsEntriesListCall) doRequest(alt string) (*http. var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -45981,21 +49932,19 @@ func (c *OrganizationsKeyvaluemapsEntriesListCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.keyvaluemaps.entries.list" call. -// Exactly one of *GoogleCloudApigeeV1ListKeyValueEntriesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudApigeeV1ListKeyValueEntriesResponse.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 *OrganizationsKeyvaluemapsEntriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListKeyValueEntriesResponse, error) { +// Do executes the "apigee.organizations.reports.get" call. +// Exactly one of *GoogleCloudApigeeV1CustomReport or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1CustomReport.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 *OrganizationsReportsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1CustomReport, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46014,7 +49963,7 @@ func (c *OrganizationsKeyvaluemapsEntriesListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListKeyValueEntriesResponse{ + ret := &GoogleCloudApigeeV1CustomReport{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -46026,36 +49975,25 @@ func (c *OrganizationsKeyvaluemapsEntriesListCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Lists key value entries for key values maps scoped to an organization, environment, or API proxy.", - // "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps/{keyvaluemapsId}/entries", + // "description": "Retrieve a custom report definition.", + // "flatPath": "v1/organizations/{organizationsId}/reports/{reportsId}", // "httpMethod": "GET", - // "id": "apigee.organizations.keyvaluemaps.entries.list", + // "id": "apigee.organizations.reports.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Optional. Maximum number of key value entries to return. If unspecified, at most 100 entries will be returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Page token. If provides, must be a valid key value entry returned from a previous call that can be used to retrieve the next page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Scope as indicated by the URI in which to list key value maps. Use **one** of the following structures in your request: * `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. * `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` * `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", + // "name": { + // "description": "Required. Custom Report name of the form: `organizations/{organization_id}/reports/{report_name}`", // "location": "path", - // "pattern": "^organizations/[^/]+/keyvaluemaps/[^/]+$", + // "pattern": "^organizations/[^/]+/reports/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/entries", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListKeyValueEntriesResponse" + // "$ref": "GoogleCloudApigeeV1CustomReport" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -46064,53 +50002,38 @@ func (c *OrganizationsKeyvaluemapsEntriesListCall) Do(opts ...googleapi.CallOpti } -// 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 *OrganizationsKeyvaluemapsEntriesListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListKeyValueEntriesResponse) 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 "apigee.organizations.operations.get": +// method id "apigee.organizations.reports.list": -type OrganizationsOperationsGetCall struct { +type OrganizationsReportsListCall struct { s *Service - name string + parent 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. +// List: Return a list of Custom Reports // -// - name: The name of the operation resource. -func (r *OrganizationsOperationsService) Get(name string) *OrganizationsOperationsGetCall { - c := &OrganizationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent organization name under which the API product +// will be listed `organizations/{organization_id}/reports`. +func (r *OrganizationsReportsService) List(parent string) *OrganizationsReportsListCall { + c := &OrganizationsReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Expand sets the optional parameter "expand": Set to 'true' to get +// expanded details about each custom report. +func (c *OrganizationsReportsListCall) Expand(expand bool) *OrganizationsReportsListCall { + c.urlParams_.Set("expand", fmt.Sprint(expand)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsOperationsGetCall { +func (c *OrganizationsReportsListCall) Fields(s ...googleapi.Field) *OrganizationsReportsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -46120,7 +50043,7 @@ func (c *OrganizationsOperationsGetCall) Fields(s ...googleapi.Field) *Organizat // 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 *OrganizationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsOperationsGetCall { +func (c *OrganizationsReportsListCall) IfNoneMatch(entityTag string) *OrganizationsReportsListCall { c.ifNoneMatch_ = entityTag return c } @@ -46128,21 +50051,21 @@ func (c *OrganizationsOperationsGetCall) IfNoneMatch(entityTag string) *Organiza // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsOperationsGetCall) Context(ctx context.Context) *OrganizationsOperationsGetCall { +func (c *OrganizationsReportsListCall) Context(ctx context.Context) *OrganizationsReportsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsOperationsGetCall) Header() http.Header { +func (c *OrganizationsReportsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsReportsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -46155,7 +50078,7 @@ func (c *OrganizationsOperationsGetCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/reports") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -46163,19 +50086,21 @@ func (c *OrganizationsOperationsGetCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.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 *OrganizationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "apigee.organizations.reports.list" call. +// Exactly one of *GoogleCloudApigeeV1ListCustomReportsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListCustomReportsResponse.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 *OrganizationsReportsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListCustomReportsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46194,7 +50119,7 @@ func (c *OrganizationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudApigeeV1ListCustomReportsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -46206,25 +50131,30 @@ func (c *OrganizationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Goog } 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": "v1/organizations/{organizationsId}/operations/{operationsId}", + // "description": "Return a list of Custom Reports", + // "flatPath": "v1/organizations/{organizationsId}/reports", // "httpMethod": "GET", - // "id": "apigee.organizations.operations.get", + // "id": "apigee.organizations.reports.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "expand": { + // "description": "Set to 'true' to get expanded details about each custom report.", + // "location": "query", + // "type": "boolean" + // }, + // "parent": { + // "description": "Required. The parent organization name under which the API product will be listed `organizations/{organization_id}/reports`", // "location": "path", - // "pattern": "^organizations/[^/]+/operations/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/reports", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudApigeeV1ListCustomReportsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -46233,107 +50163,71 @@ func (c *OrganizationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Goog } -// method id "apigee.organizations.operations.list": +// method id "apigee.organizations.reports.update": -type OrganizationsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsReportsUpdateCall struct { + s *Service + name string + googlecloudapigeev1customreport *GoogleCloudApigeeV1CustomReport + urlParams_ gensupport.URLParams + 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 allows API services to -// override the binding to use different resource name schemes, such as -// `users/*/operations`. To override the binding, API services can add a -// binding such as "/v1/{name=users/*}/operations" to their service -// configuration. For backwards compatibility, the default name includes -// the operations collection id, however overriding users must ensure -// the name binding is the parent resource, without the operations -// collection id. +// Update: Update an existing custom report definition // -// - name: The name of the operation's parent resource. -func (r *OrganizationsOperationsService) List(name string) *OrganizationsOperationsListCall { - c := &OrganizationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Custom Report name of the form: +// `organizations/{organization_id}/reports/{report_name}`. +func (r *OrganizationsReportsService) Update(name string, googlecloudapigeev1customreport *GoogleCloudApigeeV1CustomReport) *OrganizationsReportsUpdateCall { + c := &OrganizationsReportsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *OrganizationsOperationsListCall) Filter(filter string) *OrganizationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *OrganizationsOperationsListCall) PageSize(pageSize int64) *OrganizationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *OrganizationsOperationsListCall) PageToken(pageToken string) *OrganizationsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googlecloudapigeev1customreport = googlecloudapigeev1customreport return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsOperationsListCall { +func (c *OrganizationsReportsUpdateCall) Fields(s ...googleapi.Field) *OrganizationsReportsUpdateCall { 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 *OrganizationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsOperationsListCall { - 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 *OrganizationsOperationsListCall) Context(ctx context.Context) *OrganizationsOperationsListCall { +func (c *OrganizationsReportsUpdateCall) Context(ctx context.Context) *OrganizationsReportsUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsOperationsListCall) Header() http.Header { +func (c *OrganizationsReportsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsReportsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1customreport) + 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, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -46344,15 +50238,14 @@ func (c *OrganizationsOperationsListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.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 +// Do executes the "apigee.organizations.reports.update" call. +// Exactly one of *GoogleCloudApigeeV1CustomReport or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudApigeeV1CustomReport.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 *OrganizationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *OrganizationsReportsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1CustomReport, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46371,7 +50264,7 @@ func (c *OrganizationsOperationsListCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudApigeeV1CustomReport{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -46383,41 +50276,28 @@ func (c *OrganizationsOperationsListCall) Do(opts ...googleapi.CallOption) (*Goo } 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 allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - // "flatPath": "v1/organizations/{organizationsId}/operations", - // "httpMethod": "GET", - // "id": "apigee.organizations.operations.list", + // "description": "Update an existing custom report definition", + // "flatPath": "v1/organizations/{organizationsId}/reports/{reportsId}", + // "httpMethod": "PUT", + // "id": "apigee.organizations.reports.update", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. Custom Report name of the form: `organizations/{organization_id}/reports/{report_name}`", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/reports/[^/]+$", // "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": "v1/{+name}/operations", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1CustomReport" + // }, // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudApigeeV1CustomReport" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -46426,30 +50306,9 @@ func (c *OrganizationsOperationsListCall) Do(opts ...googleapi.CallOption) (*Goo } -// 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 *OrganizationsOperationsListCall) 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 "apigee.organizations.optimizedHostStats.get": +// method id "apigee.organizations.securityProfiles.get": -type OrganizationsOptimizedHostStatsGetCall struct { +type OrganizationsSecurityProfilesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -46458,131 +50317,25 @@ type OrganizationsOptimizedHostStatsGetCall struct { header_ http.Header } -// Get: Similar to GetHostStats except that the response is less -// verbose. -// -// - name: Resource name for which the interactive query will be -// executed. Use the following format in your request: -// `organizations/{organization_id}/optimizedHostStats/{dimensions}` -// Dimensions let you view metrics in meaningful groupings, such as -// `apiproxy`, `target_host`. The value of dimensions should be a -// comma-separated list as shown below: -// `organizations/{org}/optimizedHostStats/apiproxy,request_verb`. -func (r *OrganizationsOptimizedHostStatsService) Get(name string) *OrganizationsOptimizedHostStatsGetCall { - c := &OrganizationsOptimizedHostStatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Accuracy sets the optional parameter "accuracy": No longer used by -// Apigee. Supported for backwards compatibility. -func (c *OrganizationsOptimizedHostStatsGetCall) Accuracy(accuracy string) *OrganizationsOptimizedHostStatsGetCall { - c.urlParams_.Set("accuracy", accuracy) - return c -} - -// EnvgroupHostname sets the optional parameter "envgroupHostname": -// Required. Hostname for which the interactive query will be executed. -func (c *OrganizationsOptimizedHostStatsGetCall) EnvgroupHostname(envgroupHostname string) *OrganizationsOptimizedHostStatsGetCall { - c.urlParams_.Set("envgroupHostname", envgroupHostname) - return c -} - -// Filter sets the optional parameter "filter": Filter that enables you -// to drill-down on specific dimension values. -func (c *OrganizationsOptimizedHostStatsGetCall) Filter(filter string) *OrganizationsOptimizedHostStatsGetCall { - c.urlParams_.Set("filter", filter) - return c -} - -// Limit sets the optional parameter "limit": Maximum number of result -// items to return. The default and maximum value that can be returned -// is 14400. -func (c *OrganizationsOptimizedHostStatsGetCall) Limit(limit string) *OrganizationsOptimizedHostStatsGetCall { - c.urlParams_.Set("limit", limit) - return c -} - -// Offset sets the optional parameter "offset": Offset value. Use -// `offset` with `limit` to enable pagination of results. For example, -// to display results 11-20, set limit to `10` and offset to `10`. -func (c *OrganizationsOptimizedHostStatsGetCall) Offset(offset string) *OrganizationsOptimizedHostStatsGetCall { - c.urlParams_.Set("offset", offset) - return c -} - -// Realtime sets the optional parameter "realtime": No longer used by -// Apigee. Supported for backwards compatibility. -func (c *OrganizationsOptimizedHostStatsGetCall) Realtime(realtime bool) *OrganizationsOptimizedHostStatsGetCall { - c.urlParams_.Set("realtime", fmt.Sprint(realtime)) - return c -} - -// Select sets the optional parameter "select": Required. -// Comma-separated list of metrics. For example: -// `sum(message_count),sum(error_count)` -func (c *OrganizationsOptimizedHostStatsGetCall) Select(select_ string) *OrganizationsOptimizedHostStatsGetCall { - c.urlParams_.Set("select", select_) - return c -} - -// Sort sets the optional parameter "sort": Flag that specifies whether -// the sort order should be ascending or descending. Valid values -// include `DESC` and `ASC`. -func (c *OrganizationsOptimizedHostStatsGetCall) Sort(sort string) *OrganizationsOptimizedHostStatsGetCall { - c.urlParams_.Set("sort", sort) - return c -} - -// Sortby sets the optional parameter "sortby": Comma-separated list of -// columns used to sort the final result. -func (c *OrganizationsOptimizedHostStatsGetCall) Sortby(sortby string) *OrganizationsOptimizedHostStatsGetCall { - c.urlParams_.Set("sortby", sortby) - return c -} - -// TimeRange sets the optional parameter "timeRange": Required. Time -// interval for the interactive query. Time range is specified in GMT as -// `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59`. -func (c *OrganizationsOptimizedHostStatsGetCall) TimeRange(timeRange string) *OrganizationsOptimizedHostStatsGetCall { - c.urlParams_.Set("timeRange", timeRange) - return c -} - -// TimeUnit sets the optional parameter "timeUnit": Granularity of -// metrics returned. Valid values include: `second`, `minute`, `hour`, -// `day`, `week`, or `month`. -func (c *OrganizationsOptimizedHostStatsGetCall) TimeUnit(timeUnit string) *OrganizationsOptimizedHostStatsGetCall { - c.urlParams_.Set("timeUnit", timeUnit) - return c -} - -// Topk sets the optional parameter "topk": Top number of results to -// return. For example, to return the top 5 results, set `topk=5`. -func (c *OrganizationsOptimizedHostStatsGetCall) Topk(topk string) *OrganizationsOptimizedHostStatsGetCall { - c.urlParams_.Set("topk", topk) - return c -} - -// TsAscending sets the optional parameter "tsAscending": Flag that -// specifies whether to list timestamps in ascending (`true`) or -// descending (`false`) order. Apigee recommends that you set this value -// to `true` if you are using `sortby` with `sort=DESC`. -func (c *OrganizationsOptimizedHostStatsGetCall) TsAscending(tsAscending bool) *OrganizationsOptimizedHostStatsGetCall { - c.urlParams_.Set("tsAscending", fmt.Sprint(tsAscending)) - return c -} - -// Tzo sets the optional parameter "tzo": Timezone offset value. -func (c *OrganizationsOptimizedHostStatsGetCall) Tzo(tzo string) *OrganizationsOptimizedHostStatsGetCall { - c.urlParams_.Set("tzo", tzo) +// Get: GetSecurityProfile gets the specified security profile. Returns +// NOT_FOUND if security profile is not present for the specified +// organization. +// +// - name: Security profile in the following format: +// `organizations/{org}/securityProfiles/{profile}'. Profile may +// optionally contain revision ID. If revision ID is not provided, the +// response will contain latest revision by default. Example: +// organizations/testOrg/securityProfiles/testProfile@5. +func (r *OrganizationsSecurityProfilesService) Get(name string) *OrganizationsSecurityProfilesGetCall { + c := &OrganizationsSecurityProfilesGetCall{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 *OrganizationsOptimizedHostStatsGetCall) Fields(s ...googleapi.Field) *OrganizationsOptimizedHostStatsGetCall { +func (c *OrganizationsSecurityProfilesGetCall) Fields(s ...googleapi.Field) *OrganizationsSecurityProfilesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -46592,7 +50345,7 @@ func (c *OrganizationsOptimizedHostStatsGetCall) Fields(s ...googleapi.Field) *O // 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 *OrganizationsOptimizedHostStatsGetCall) IfNoneMatch(entityTag string) *OrganizationsOptimizedHostStatsGetCall { +func (c *OrganizationsSecurityProfilesGetCall) IfNoneMatch(entityTag string) *OrganizationsSecurityProfilesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -46600,21 +50353,21 @@ func (c *OrganizationsOptimizedHostStatsGetCall) IfNoneMatch(entityTag string) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsOptimizedHostStatsGetCall) Context(ctx context.Context) *OrganizationsOptimizedHostStatsGetCall { +func (c *OrganizationsSecurityProfilesGetCall) Context(ctx context.Context) *OrganizationsSecurityProfilesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsOptimizedHostStatsGetCall) Header() http.Header { +func (c *OrganizationsSecurityProfilesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsOptimizedHostStatsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSecurityProfilesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -46640,15 +50393,15 @@ func (c *OrganizationsOptimizedHostStatsGetCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.optimizedHostStats.get" call. -// Exactly one of *GoogleCloudApigeeV1OptimizedStats or error will be +// Do executes the "apigee.organizations.securityProfiles.get" call. +// Exactly one of *GoogleCloudApigeeV1SecurityProfile or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1OptimizedStats.ServerResponse.Header or +// either *GoogleCloudApigeeV1SecurityProfile.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 *OrganizationsOptimizedHostStatsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1OptimizedStats, error) { +func (c *OrganizationsSecurityProfilesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1SecurityProfile, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46667,7 +50420,7 @@ func (c *OrganizationsOptimizedHostStatsGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1OptimizedStats{ + ret := &GoogleCloudApigeeV1SecurityProfile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -46679,95 +50432,25 @@ func (c *OrganizationsOptimizedHostStatsGetCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Similar to GetHostStats except that the response is less verbose.", - // "flatPath": "v1/organizations/{organizationsId}/optimizedHostStats/{optimizedHostStatsId}", + // "description": "GetSecurityProfile gets the specified security profile. Returns NOT_FOUND if security profile is not present for the specified organization.", + // "flatPath": "v1/organizations/{organizationsId}/securityProfiles/{securityProfilesId}", // "httpMethod": "GET", - // "id": "apigee.organizations.optimizedHostStats.get", + // "id": "apigee.organizations.securityProfiles.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "accuracy": { - // "description": "No longer used by Apigee. Supported for backwards compatibility.", - // "location": "query", - // "type": "string" - // }, - // "envgroupHostname": { - // "description": "Required. Hostname for which the interactive query will be executed.", - // "location": "query", - // "type": "string" - // }, - // "filter": { - // "description": "Filter that enables you to drill-down on specific dimension values.", - // "location": "query", - // "type": "string" - // }, - // "limit": { - // "description": "Maximum number of result items to return. The default and maximum value that can be returned is 14400.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "Required. Resource name for which the interactive query will be executed. Use the following format in your request: `organizations/{organization_id}/optimizedHostStats/{dimensions}` Dimensions let you view metrics in meaningful groupings, such as `apiproxy`, `target_host`. The value of dimensions should be a comma-separated list as shown below: `organizations/{org}/optimizedHostStats/apiproxy,request_verb`", + // "description": "Required. Security profile in the following format: `organizations/{org}/securityProfiles/{profile}'. Profile may optionally contain revision ID. If revision ID is not provided, the response will contain latest revision by default. Example: organizations/testOrg/securityProfiles/testProfile@5", // "location": "path", - // "pattern": "^organizations/[^/]+/optimizedHostStats/.*$", + // "pattern": "^organizations/[^/]+/securityProfiles/[^/]+$", // "required": true, // "type": "string" - // }, - // "offset": { - // "description": "Offset value. Use `offset` with `limit` to enable pagination of results. For example, to display results 11-20, set limit to `10` and offset to `10`.", - // "location": "query", - // "type": "string" - // }, - // "realtime": { - // "description": "No longer used by Apigee. Supported for backwards compatibility.", - // "location": "query", - // "type": "boolean" - // }, - // "select": { - // "description": "Required. Comma-separated list of metrics. For example: `sum(message_count),sum(error_count)`", - // "location": "query", - // "type": "string" - // }, - // "sort": { - // "description": "Flag that specifies whether the sort order should be ascending or descending. Valid values include `DESC` and `ASC`.", - // "location": "query", - // "type": "string" - // }, - // "sortby": { - // "description": "Comma-separated list of columns used to sort the final result.", - // "location": "query", - // "type": "string" - // }, - // "timeRange": { - // "description": "Required. Time interval for the interactive query. Time range is specified in GMT as `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59`.", - // "location": "query", - // "type": "string" - // }, - // "timeUnit": { - // "description": "Granularity of metrics returned. Valid values include: `second`, `minute`, `hour`, `day`, `week`, or `month`.", - // "location": "query", - // "type": "string" - // }, - // "topk": { - // "description": "Top number of results to return. For example, to return the top 5 results, set `topk=5`.", - // "location": "query", - // "type": "string" - // }, - // "tsAscending": { - // "description": "Flag that specifies whether to list timestamps in ascending (`true`) or descending (`false`) order. Apigee recommends that you set this value to `true` if you are using `sortby` with `sort=DESC`.", - // "location": "query", - // "type": "boolean" - // }, - // "tzo": { - // "description": "Timezone offset value.", - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1OptimizedStats" + // "$ref": "GoogleCloudApigeeV1SecurityProfile" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -46776,79 +50459,95 @@ func (c *OrganizationsOptimizedHostStatsGetCall) Do(opts ...googleapi.CallOption } -// method id "apigee.organizations.reports.create": +// method id "apigee.organizations.securityProfiles.list": -type OrganizationsReportsCreateCall struct { - s *Service - parent string - googlecloudapigeev1customreport *GoogleCloudApigeeV1CustomReport - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsSecurityProfilesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Custom Report for an Organization. A Custom Report -// provides Apigee Customers to create custom dashboards in addition to -// the standard dashboards which are provided. The Custom Report in its -// simplest form contains specifications about metrics, dimensions and -// filters. It is important to note that the custom report by itself -// does not provide an executable entity. The Edge UI converts the -// custom report definition into an analytics query and displays the -// result in a chart. +// List: ListSecurityProfiles lists all the security profiles associated +// with the org including attached and unattached profiles. // -// - parent: The parent organization name under which the Custom Report -// will be created. Must be of the form: -// `organizations/{organization_id}/reports`. -func (r *OrganizationsReportsService) Create(parent string, googlecloudapigeev1customreport *GoogleCloudApigeeV1CustomReport) *OrganizationsReportsCreateCall { - c := &OrganizationsReportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: For a specific organization, list of all the security +// profiles. Format: `organizations/{org}`. +func (r *OrganizationsSecurityProfilesService) List(parent string) *OrganizationsSecurityProfilesListCall { + c := &OrganizationsSecurityProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1customreport = googlecloudapigeev1customreport + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of profiles to return. The service may return fewer than this value. +// If unspecified, at most 50 profiles will be returned. +func (c *OrganizationsSecurityProfilesListCall) PageSize(pageSize int64) *OrganizationsSecurityProfilesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListSecurityProfiles` call. Provide this to +// retrieve the subsequent page. +func (c *OrganizationsSecurityProfilesListCall) PageToken(pageToken string) *OrganizationsSecurityProfilesListCall { + 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 *OrganizationsReportsCreateCall) Fields(s ...googleapi.Field) *OrganizationsReportsCreateCall { +func (c *OrganizationsSecurityProfilesListCall) Fields(s ...googleapi.Field) *OrganizationsSecurityProfilesListCall { 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 *OrganizationsSecurityProfilesListCall) IfNoneMatch(entityTag string) *OrganizationsSecurityProfilesListCall { + 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 *OrganizationsReportsCreateCall) Context(ctx context.Context) *OrganizationsReportsCreateCall { +func (c *OrganizationsSecurityProfilesListCall) Context(ctx context.Context) *OrganizationsSecurityProfilesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsReportsCreateCall) Header() http.Header { +func (c *OrganizationsSecurityProfilesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsReportsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSecurityProfilesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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.googlecloudapigeev1customreport) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/reports") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/securityProfiles") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -46859,14 +50558,16 @@ func (c *OrganizationsReportsCreateCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.reports.create" call. -// Exactly one of *GoogleCloudApigeeV1CustomReport or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1CustomReport.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 *OrganizationsReportsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1CustomReport, error) { +// Do executes the "apigee.organizations.securityProfiles.list" call. +// Exactly one of *GoogleCloudApigeeV1ListSecurityProfilesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudApigeeV1ListSecurityProfilesResponse.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 *OrganizationsSecurityProfilesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListSecurityProfilesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46885,7 +50586,7 @@ func (c *OrganizationsReportsCreateCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1CustomReport{ + ret := &GoogleCloudApigeeV1ListSecurityProfilesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -46897,28 +50598,36 @@ func (c *OrganizationsReportsCreateCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Creates a Custom Report for an Organization. A Custom Report provides Apigee Customers to create custom dashboards in addition to the standard dashboards which are provided. The Custom Report in its simplest form contains specifications about metrics, dimensions and filters. It is important to note that the custom report by itself does not provide an executable entity. The Edge UI converts the custom report definition into an analytics query and displays the result in a chart.", - // "flatPath": "v1/organizations/{organizationsId}/reports", - // "httpMethod": "POST", - // "id": "apigee.organizations.reports.create", + // "description": "ListSecurityProfiles lists all the security profiles associated with the org including attached and unattached profiles.", + // "flatPath": "v1/organizations/{organizationsId}/securityProfiles", + // "httpMethod": "GET", + // "id": "apigee.organizations.securityProfiles.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "pageSize": { + // "description": "The maximum number of profiles to return. The service may return fewer than this value. If unspecified, at most 50 profiles will be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListSecurityProfiles` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. The parent organization name under which the Custom Report will be created. Must be of the form: `organizations/{organization_id}/reports`", + // "description": "Required. For a specific organization, list of all the security profiles. Format: `organizations/{org}`", // "location": "path", // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/reports", - // "request": { - // "$ref": "GoogleCloudApigeeV1CustomReport" - // }, + // "path": "v1/{+parent}/securityProfiles", // "response": { - // "$ref": "GoogleCloudApigeeV1CustomReport" + // "$ref": "GoogleCloudApigeeV1ListSecurityProfilesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -46927,64 +50636,116 @@ func (c *OrganizationsReportsCreateCall) Do(opts ...googleapi.CallOption) (*Goog } -// method id "apigee.organizations.reports.delete": +// 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 *OrganizationsSecurityProfilesListCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListSecurityProfilesResponse) 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) + } +} -type OrganizationsReportsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "apigee.organizations.securityProfiles.listRevisions": + +type OrganizationsSecurityProfilesListRevisionsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an existing custom report definition +// ListRevisions: ListSecurityProfileRevisions lists all the revisions +// of the security profile. // -// - name: Custom Report name of the form: -// `organizations/{organization_id}/reports/{report_name}`. -func (r *OrganizationsReportsService) Delete(name string) *OrganizationsReportsDeleteCall { - c := &OrganizationsReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: For a specific profile, list all the revisions. Format: +// `organizations/{org}/securityProfiles/{profile}`. +func (r *OrganizationsSecurityProfilesService) ListRevisions(name string) *OrganizationsSecurityProfilesListRevisionsCall { + c := &OrganizationsSecurityProfilesListRevisionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// PageSize sets the optional parameter "pageSize": The maximum number +// of profile revisions to return. The service may return fewer than +// this value. If unspecified, at most 50 revisions will be returned. +func (c *OrganizationsSecurityProfilesListRevisionsCall) PageSize(pageSize int64) *OrganizationsSecurityProfilesListRevisionsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListSecurityProfileRevisions` call. Provide +// this to retrieve the subsequent page. +func (c *OrganizationsSecurityProfilesListRevisionsCall) PageToken(pageToken string) *OrganizationsSecurityProfilesListRevisionsCall { + 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 *OrganizationsReportsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsReportsDeleteCall { +func (c *OrganizationsSecurityProfilesListRevisionsCall) Fields(s ...googleapi.Field) *OrganizationsSecurityProfilesListRevisionsCall { 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 *OrganizationsSecurityProfilesListRevisionsCall) IfNoneMatch(entityTag string) *OrganizationsSecurityProfilesListRevisionsCall { + 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 *OrganizationsReportsDeleteCall) Context(ctx context.Context) *OrganizationsReportsDeleteCall { +func (c *OrganizationsSecurityProfilesListRevisionsCall) Context(ctx context.Context) *OrganizationsSecurityProfilesListRevisionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsReportsDeleteCall) Header() http.Header { +func (c *OrganizationsSecurityProfilesListRevisionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsReportsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSecurityProfilesListRevisionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:listRevisions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -46995,16 +50756,17 @@ func (c *OrganizationsReportsDeleteCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.reports.delete" call. -// Exactly one of *GoogleCloudApigeeV1DeleteCustomReportResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "apigee.organizations.securityProfiles.listRevisions" call. +// Exactly one of +// *GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudApigeeV1DeleteCustomReportResponse.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse.ServerRespons +// e.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 *OrganizationsReportsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1DeleteCustomReportResponse, error) { +func (c *OrganizationsSecurityProfilesListRevisionsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47023,7 +50785,7 @@ func (c *OrganizationsReportsDeleteCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1DeleteCustomReportResponse{ + ret := &GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47035,25 +50797,36 @@ func (c *OrganizationsReportsDeleteCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Deletes an existing custom report definition", - // "flatPath": "v1/organizations/{organizationsId}/reports/{reportsId}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.reports.delete", + // "description": "ListSecurityProfileRevisions lists all the revisions of the security profile.", + // "flatPath": "v1/organizations/{organizationsId}/securityProfiles/{securityProfilesId}:listRevisions", + // "httpMethod": "GET", + // "id": "apigee.organizations.securityProfiles.listRevisions", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Custom Report name of the form: `organizations/{organization_id}/reports/{report_name}`", + // "description": "Required. For a specific profile, list all the revisions. Format: `organizations/{org}/securityProfiles/{profile}`", // "location": "path", - // "pattern": "^organizations/[^/]+/reports/[^/]+$", + // "pattern": "^organizations/[^/]+/securityProfiles/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of profile revisions to return. The service may return fewer than this value. If unspecified, at most 50 revisions will be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListSecurityProfileRevisions` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}:listRevisions", // "response": { - // "$ref": "GoogleCloudApigeeV1DeleteCustomReportResponse" + // "$ref": "GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -47062,96 +50835,115 @@ func (c *OrganizationsReportsDeleteCall) Do(opts ...googleapi.CallOption) (*Goog } -// method id "apigee.organizations.reports.get": +// 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 *OrganizationsSecurityProfilesListRevisionsCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ListSecurityProfileRevisionsResponse) 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) + } +} -type OrganizationsReportsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "apigee.organizations.securityProfiles.environments.computeEnvironmentScores": + +type OrganizationsSecurityProfilesEnvironmentsComputeEnvironmentScoresCall struct { + s *Service + profileEnvironment string + googlecloudapigeev1computeenvironmentscoresrequest *GoogleCloudApigeeV1ComputeEnvironmentScoresRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieve a custom report definition. +// ComputeEnvironmentScores: ComputeEnvironmentScores calculates scores +// for requested time range for the specified security profile and +// environment. // -// - name: Custom Report name of the form: -// `organizations/{organization_id}/reports/{report_name}`. -func (r *OrganizationsReportsService) Get(name string) *OrganizationsReportsGetCall { - c := &OrganizationsReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - profileEnvironment: Name of organization and environment and +// profile id for which score needs to be computed. Format: +// organizations/{org}/securityProfiles/{profile}/environments/{env}. +func (r *OrganizationsSecurityProfilesEnvironmentsService) ComputeEnvironmentScores(profileEnvironment string, googlecloudapigeev1computeenvironmentscoresrequest *GoogleCloudApigeeV1ComputeEnvironmentScoresRequest) *OrganizationsSecurityProfilesEnvironmentsComputeEnvironmentScoresCall { + c := &OrganizationsSecurityProfilesEnvironmentsComputeEnvironmentScoresCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.profileEnvironment = profileEnvironment + c.googlecloudapigeev1computeenvironmentscoresrequest = googlecloudapigeev1computeenvironmentscoresrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsReportsGetCall) Fields(s ...googleapi.Field) *OrganizationsReportsGetCall { +func (c *OrganizationsSecurityProfilesEnvironmentsComputeEnvironmentScoresCall) Fields(s ...googleapi.Field) *OrganizationsSecurityProfilesEnvironmentsComputeEnvironmentScoresCall { 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 *OrganizationsReportsGetCall) IfNoneMatch(entityTag string) *OrganizationsReportsGetCall { - 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 *OrganizationsReportsGetCall) Context(ctx context.Context) *OrganizationsReportsGetCall { +func (c *OrganizationsSecurityProfilesEnvironmentsComputeEnvironmentScoresCall) Context(ctx context.Context) *OrganizationsSecurityProfilesEnvironmentsComputeEnvironmentScoresCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsReportsGetCall) Header() http.Header { +func (c *OrganizationsSecurityProfilesEnvironmentsComputeEnvironmentScoresCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsReportsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSecurityProfilesEnvironmentsComputeEnvironmentScoresCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1computeenvironmentscoresrequest) + 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+profileEnvironment}:computeEnvironmentScores") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "profileEnvironment": c.profileEnvironment, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.reports.get" call. -// Exactly one of *GoogleCloudApigeeV1CustomReport or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1CustomReport.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 *OrganizationsReportsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1CustomReport, error) { +// Do executes the "apigee.organizations.securityProfiles.environments.computeEnvironmentScores" call. +// Exactly one of *GoogleCloudApigeeV1ComputeEnvironmentScoresResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudApigeeV1ComputeEnvironmentScoresResponse.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 *OrganizationsSecurityProfilesEnvironmentsComputeEnvironmentScoresCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ComputeEnvironmentScoresResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47170,7 +50962,7 @@ func (c *OrganizationsReportsGetCall) Do(opts ...googleapi.CallOption) (*GoogleC if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1CustomReport{ + ret := &GoogleCloudApigeeV1ComputeEnvironmentScoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47182,25 +50974,28 @@ func (c *OrganizationsReportsGetCall) Do(opts ...googleapi.CallOption) (*GoogleC } return ret, nil // { - // "description": "Retrieve a custom report definition.", - // "flatPath": "v1/organizations/{organizationsId}/reports/{reportsId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.reports.get", + // "description": "ComputeEnvironmentScores calculates scores for requested time range for the specified security profile and environment.", + // "flatPath": "v1/organizations/{organizationsId}/securityProfiles/{securityProfilesId}/environments/{environmentsId}:computeEnvironmentScores", + // "httpMethod": "POST", + // "id": "apigee.organizations.securityProfiles.environments.computeEnvironmentScores", // "parameterOrder": [ - // "name" + // "profileEnvironment" // ], // "parameters": { - // "name": { - // "description": "Required. Custom Report name of the form: `organizations/{organization_id}/reports/{report_name}`", + // "profileEnvironment": { + // "description": "Required. Name of organization and environment and profile id for which score needs to be computed. Format: organizations/{org}/securityProfiles/{profile}/environments/{env}", // "location": "path", - // "pattern": "^organizations/[^/]+/reports/[^/]+$", + // "pattern": "^organizations/[^/]+/securityProfiles/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+profileEnvironment}:computeEnvironmentScores", + // "request": { + // "$ref": "GoogleCloudApigeeV1ComputeEnvironmentScoresRequest" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1CustomReport" + // "$ref": "GoogleCloudApigeeV1ComputeEnvironmentScoresResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -47209,85 +51004,94 @@ func (c *OrganizationsReportsGetCall) Do(opts ...googleapi.CallOption) (*GoogleC } -// method id "apigee.organizations.reports.list": +// 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 *OrganizationsSecurityProfilesEnvironmentsComputeEnvironmentScoresCall) Pages(ctx context.Context, f func(*GoogleCloudApigeeV1ComputeEnvironmentScoresResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googlecloudapigeev1computeenvironmentscoresrequest.PageToken = pt }(c.googlecloudapigeev1computeenvironmentscoresrequest.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.googlecloudapigeev1computeenvironmentscoresrequest.PageToken = x.NextPageToken + } +} -type OrganizationsReportsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "apigee.organizations.securityProfiles.environments.create": + +type OrganizationsSecurityProfilesEnvironmentsCreateCall struct { + s *Service + parent string + googlecloudapigeev1securityprofileenvironmentassociation *GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Return a list of Custom Reports +// Create: CreateSecurityProfileEnvironmentAssociation creates profile +// environment association i.e. attaches environment to security +// profile. // -// - parent: The parent organization name under which the API product -// will be listed `organizations/{organization_id}/reports`. -func (r *OrganizationsReportsService) List(parent string) *OrganizationsReportsListCall { - c := &OrganizationsReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Name of organization and security profile ID. Format: +// organizations/{org}/securityProfiles/{profile}. +func (r *OrganizationsSecurityProfilesEnvironmentsService) Create(parent string, googlecloudapigeev1securityprofileenvironmentassociation *GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation) *OrganizationsSecurityProfilesEnvironmentsCreateCall { + c := &OrganizationsSecurityProfilesEnvironmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// Expand sets the optional parameter "expand": Set to 'true' to get -// expanded details about each custom report. -func (c *OrganizationsReportsListCall) Expand(expand bool) *OrganizationsReportsListCall { - c.urlParams_.Set("expand", fmt.Sprint(expand)) + c.googlecloudapigeev1securityprofileenvironmentassociation = googlecloudapigeev1securityprofileenvironmentassociation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsReportsListCall) Fields(s ...googleapi.Field) *OrganizationsReportsListCall { +func (c *OrganizationsSecurityProfilesEnvironmentsCreateCall) Fields(s ...googleapi.Field) *OrganizationsSecurityProfilesEnvironmentsCreateCall { 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 *OrganizationsReportsListCall) IfNoneMatch(entityTag string) *OrganizationsReportsListCall { - 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 *OrganizationsReportsListCall) Context(ctx context.Context) *OrganizationsReportsListCall { +func (c *OrganizationsSecurityProfilesEnvironmentsCreateCall) Context(ctx context.Context) *OrganizationsSecurityProfilesEnvironmentsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsReportsListCall) Header() http.Header { +func (c *OrganizationsSecurityProfilesEnvironmentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsReportsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSecurityProfilesEnvironmentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1securityprofileenvironmentassociation) + 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, "v1/{+parent}/reports") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/environments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -47298,16 +51102,17 @@ func (c *OrganizationsReportsListCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.reports.list" call. -// Exactly one of *GoogleCloudApigeeV1ListCustomReportsResponse or error +// Do executes the "apigee.organizations.securityProfiles.environments.create" call. +// Exactly one of +// *GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudApigeeV1ListCustomReportsResponse.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation.ServerRespon +// se.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 *OrganizationsReportsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListCustomReportsResponse, error) { +func (c *OrganizationsSecurityProfilesEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47326,7 +51131,7 @@ func (c *OrganizationsReportsListCall) Do(opts ...googleapi.CallOption) (*Google if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListCustomReportsResponse{ + ret := &GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47338,30 +51143,28 @@ func (c *OrganizationsReportsListCall) Do(opts ...googleapi.CallOption) (*Google } return ret, nil // { - // "description": "Return a list of Custom Reports", - // "flatPath": "v1/organizations/{organizationsId}/reports", - // "httpMethod": "GET", - // "id": "apigee.organizations.reports.list", + // "description": "CreateSecurityProfileEnvironmentAssociation creates profile environment association i.e. attaches environment to security profile.", + // "flatPath": "v1/organizations/{organizationsId}/securityProfiles/{securityProfilesId}/environments", + // "httpMethod": "POST", + // "id": "apigee.organizations.securityProfiles.environments.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "expand": { - // "description": "Set to 'true' to get expanded details about each custom report.", - // "location": "query", - // "type": "boolean" - // }, // "parent": { - // "description": "Required. The parent organization name under which the API product will be listed `organizations/{organization_id}/reports`", + // "description": "Required. Name of organization and security profile ID. Format: organizations/{org}/securityProfiles/{profile}", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/securityProfiles/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/reports", + // "path": "v1/{+parent}/environments", + // "request": { + // "$ref": "GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ListCustomReportsResponse" + // "$ref": "GoogleCloudApigeeV1SecurityProfileEnvironmentAssociation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -47370,32 +51173,32 @@ func (c *OrganizationsReportsListCall) Do(opts ...googleapi.CallOption) (*Google } -// method id "apigee.organizations.reports.update": +// method id "apigee.organizations.securityProfiles.environments.delete": -type OrganizationsReportsUpdateCall struct { - s *Service - name string - googlecloudapigeev1customreport *GoogleCloudApigeeV1CustomReport - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsSecurityProfilesEnvironmentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Update an existing custom report definition +// Delete: DeleteSecurityProfileEnvironmentAssociation removes profile +// environment association i.e. detaches environment from security +// profile. // -// - name: Custom Report name of the form: -// `organizations/{organization_id}/reports/{report_name}`. -func (r *OrganizationsReportsService) Update(name string, googlecloudapigeev1customreport *GoogleCloudApigeeV1CustomReport) *OrganizationsReportsUpdateCall { - c := &OrganizationsReportsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the environment attachment to delete. Format: +// organizations/{org}/securityProfiles/{profile}/environments/{env}. +func (r *OrganizationsSecurityProfilesEnvironmentsService) Delete(name string) *OrganizationsSecurityProfilesEnvironmentsDeleteCall { + c := &OrganizationsSecurityProfilesEnvironmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudapigeev1customreport = googlecloudapigeev1customreport return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsReportsUpdateCall) Fields(s ...googleapi.Field) *OrganizationsReportsUpdateCall { +func (c *OrganizationsSecurityProfilesEnvironmentsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsSecurityProfilesEnvironmentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -47403,21 +51206,21 @@ func (c *OrganizationsReportsUpdateCall) Fields(s ...googleapi.Field) *Organizat // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsReportsUpdateCall) Context(ctx context.Context) *OrganizationsReportsUpdateCall { +func (c *OrganizationsSecurityProfilesEnvironmentsDeleteCall) Context(ctx context.Context) *OrganizationsSecurityProfilesEnvironmentsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsReportsUpdateCall) Header() http.Header { +func (c *OrganizationsSecurityProfilesEnvironmentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsReportsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSecurityProfilesEnvironmentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -47425,16 +51228,11 @@ func (c *OrganizationsReportsUpdateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1customreport) - 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, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -47445,14 +51243,14 @@ func (c *OrganizationsReportsUpdateCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.reports.update" call. -// Exactly one of *GoogleCloudApigeeV1CustomReport or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudApigeeV1CustomReport.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 +// Do executes the "apigee.organizations.securityProfiles.environments.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 *OrganizationsReportsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1CustomReport, error) { +func (c *OrganizationsSecurityProfilesEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47471,7 +51269,7 @@ func (c *OrganizationsReportsUpdateCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1CustomReport{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47483,28 +51281,25 @@ func (c *OrganizationsReportsUpdateCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Update an existing custom report definition", - // "flatPath": "v1/organizations/{organizationsId}/reports/{reportsId}", - // "httpMethod": "PUT", - // "id": "apigee.organizations.reports.update", + // "description": "DeleteSecurityProfileEnvironmentAssociation removes profile environment association i.e. detaches environment from security profile.", + // "flatPath": "v1/organizations/{organizationsId}/securityProfiles/{securityProfilesId}/environments/{environmentsId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.securityProfiles.environments.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Custom Report name of the form: `organizations/{organization_id}/reports/{report_name}`", + // "description": "Required. The name of the environment attachment to delete. Format: organizations/{org}/securityProfiles/{profile}/environments/{env}", // "location": "path", - // "pattern": "^organizations/[^/]+/reports/[^/]+$", + // "pattern": "^organizations/[^/]+/securityProfiles/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1CustomReport" - // }, // "response": { - // "$ref": "GoogleCloudApigeeV1CustomReport" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" diff --git a/beyondcorp/v1/beyondcorp-api.json b/beyondcorp/v1/beyondcorp-api.json new file mode 100644 index 00000000000..7122506dc3c --- /dev/null +++ b/beyondcorp/v1/beyondcorp-api.json @@ -0,0 +1,1623 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://beyondcorp.googleapis.com/", + "batchPath": "batch", + "canonicalName": "BeyondCorp", + "description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/", + "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": "beyondcorp:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://beyondcorp.mtls.googleapis.com/", + "name": "beyondcorp", + "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" + }, + "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" + }, + "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": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudLocationLocation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "GoogleCloudLocationListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "appConnections": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}:getIamPolicy", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.appConnections.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}:setIamPolicy", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.appConnections.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}:testIamPermissions", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.appConnections.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "appConnectors": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:getIamPolicy", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.appConnectors.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:setIamPolicy", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.appConnectors.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:testIamPermissions", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.appConnectors.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "appGateways": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}:getIamPolicy", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.appGateways.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}:setIamPolicy", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.appGateways.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}:testIamPermissions", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.appGateways.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "clientConnectorServices": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:getIamPolicy", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:setIamPolicy", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:testIamPermissions", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "clientGateways": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:getIamPolicy", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.clientGateways.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:setIamPolicy", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.clientGateways.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:testIamPermissions", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.clientGateways.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "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.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "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`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "beyondcorp.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "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": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "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 allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.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": "^projects/[^/]+/locations/[^/]+$", + "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": "v1/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20220616", + "rootUrl": "https://beyondcorp.googleapis.com/", + "schemas": { + "CloudSecurityZerotrustApplinkAppConnectorProtoConnectionConfig": { + "description": "ConnectionConfig represents a Connection Configuration object.", + "id": "CloudSecurityZerotrustApplinkAppConnectorProtoConnectionConfig", + "properties": { + "applicationEndpoint": { + "description": "application_endpoint is the endpoint of the application the form of host:port. For example, \"localhost:80\".", + "type": "string" + }, + "applicationName": { + "description": "application_name represents the given name of the application the connection is connecting with.", + "type": "string" + }, + "gateway": { + "description": "gateway lists all instances running a gateway in GCP. They all connect to a connector on the host.", + "items": { + "$ref": "CloudSecurityZerotrustApplinkAppConnectorProtoGateway" + }, + "type": "array" + }, + "name": { + "description": "name is the unique ID for each connection. TODO(b/190732451) returns connection name from user-specified name in config. Now, name = ${application_name}:${application_endpoint}", + "type": "string" + }, + "project": { + "description": "project represents the consumer project the connection belongs to.", + "type": "string" + }, + "tunnelsPerGateway": { + "description": "tunnels_per_gateway reflects the number of tunnels between a connector and a gateway.", + "format": "uint32", + "type": "integer" + }, + "userPort": { + "description": "user_port specifies the reserved port on gateways for user connections.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "CloudSecurityZerotrustApplinkAppConnectorProtoConnectorDetails": { + "description": "ConnectorDetails reflects the details of a connector.", + "id": "CloudSecurityZerotrustApplinkAppConnectorProtoConnectorDetails", + "properties": {}, + "type": "object" + }, + "CloudSecurityZerotrustApplinkAppConnectorProtoGateway": { + "description": "Gateway represents a GCE VM Instance endpoint for use by IAP TCP.", + "id": "CloudSecurityZerotrustApplinkAppConnectorProtoGateway", + "properties": { + "interface": { + "description": "interface specifies the network interface of the gateway to connect to.", + "type": "string" + }, + "name": { + "description": "name is the name of an instance running a gateway. It is the unique ID for a gateway. All gateways under the same connection have the same prefix. It is derived from the gateway URL. For example, name=${instance} assuming a gateway URL. https://www.googleapis.com/compute/${version}/projects/${project}/zones/${zone}/instances/${instance}", + "type": "string" + }, + "port": { + "description": "port specifies the port of the gateway for tunnel connections from the connectors.", + "format": "uint32", + "type": "integer" + }, + "project": { + "description": "project is the tenant project the gateway belongs to. Different from the project in the connection, it is a BeyondCorpAPI internally created project to manage all the gateways. It is sharing the same network with the consumer project user owned. It is derived from the gateway URL. For example, project=${project} assuming a gateway URL. https://www.googleapis.com/compute/${version}/projects/${project}/zones/${zone}/instances/${instance}", + "type": "string" + }, + "selfLink": { + "description": "self_link is the gateway URL in the form https://www.googleapis.com/compute/${version}/projects/${project}/zones/${zone}/instances/${instance}", + "type": "string" + }, + "zone": { + "description": "zone represents the zone the instance belongs. It is derived from the gateway URL. For example, zone=${zone} assuming a gateway URL. https://www.googleapis.com/compute/${version}/projects/${project}/zones/${zone}/instances/${instance}", + "type": "string" + } + }, + "type": "object" + }, + "CloudSecurityZerotrustApplinkLogagentProtoLogAgentDetails": { + "description": "LogAgentDetails reflects the details of a log agent.", + "id": "CloudSecurityZerotrustApplinkLogagentProtoLogAgentDetails", + "properties": {}, + "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: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnectionOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnectionOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnectorOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnectorOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpAppconnectorsV1alphaContainerHealthDetails": { + "description": "ContainerHealthDetails reflects the health details of a container.", + "id": "GoogleCloudBeyondcorpAppconnectorsV1alphaContainerHealthDetails", + "properties": { + "currentConfigVersion": { + "description": "The version of the current config.", + "type": "string" + }, + "errorMsg": { + "description": "The latest error message.", + "type": "string" + }, + "expectedConfigVersion": { + "description": "The version of the expected config.", + "type": "string" + }, + "extendedStatus": { + "additionalProperties": { + "type": "string" + }, + "description": "The extended status. Such as ExitCode, StartedAt, FinishedAt, etc.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpAppconnectorsV1alphaRemoteAgentDetails": { + "description": "RemoteAgentDetails reflects the details of a remote agent.", + "id": "GoogleCloudBeyondcorpAppconnectorsV1alphaRemoteAgentDetails", + "properties": {}, + "type": "object" + }, + "GoogleCloudBeyondcorpAppgatewaysV1alphaAppGatewayOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudBeyondcorpAppgatewaysV1alphaAppGatewayOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata", + "properties": { + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpClientconnectorservicesV1alphaClientConnectorServiceOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudBeyondcorpClientconnectorservicesV1alphaClientConnectorServiceOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpClientgatewaysV1alphaClientGatewayOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudBeyondcorpClientgatewaysV1alphaClientGatewayOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpConnectionsV1alphaConnectionOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudBeyondcorpConnectionsV1alphaConnectionOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpConnectorsV1alphaConnectorOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudBeyondcorpConnectorsV1alphaConnectorOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpConnectorsV1alphaContainerHealthDetails": { + "description": "ContainerHealthDetails reflects the health details of a container.", + "id": "GoogleCloudBeyondcorpConnectorsV1alphaContainerHealthDetails", + "properties": { + "currentConfigVersion": { + "description": "The version of the current config.", + "type": "string" + }, + "errorMsg": { + "description": "The latest error message.", + "type": "string" + }, + "expectedConfigVersion": { + "description": "The version of the expected config.", + "type": "string" + }, + "extendedStatus": { + "additionalProperties": { + "type": "string" + }, + "description": "The extended status. Such as ExitCode, StartedAt, FinishedAt, etc.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpConnectorsV1alphaRemoteAgentDetails": { + "description": "RemoteAgentDetails reflects the details of a remote agent.", + "id": "GoogleCloudBeyondcorpConnectorsV1alphaRemoteAgentDetails", + "properties": {}, + "type": "object" + }, + "GoogleCloudLocationListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "GoogleCloudLocationListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleCloudLocationLocation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudLocationLocation": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "GoogleCloudLocationLocation", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", + "id": "GoogleIamV1AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "GoogleIamV1AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "GoogleIamV1AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "GoogleIamV1Binding", + "properties": { + "condition": { + "$ref": "GoogleTypeExpr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud 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@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`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) 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 the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "GoogleIamV1Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "GoogleIamV1AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", + "items": { + "$ref": "GoogleIamV1Binding" + }, + "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. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleIamV1SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "GoogleIamV1SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "GoogleIamV1Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "GoogleIamV1TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleIamV1TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "GoogleIamV1TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleLongrunningCancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "GoogleLongrunningCancelOperationRequest", + "properties": {}, + "type": "object" + }, + "GoogleLongrunningListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "GoogleLongrunningListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleLongrunningOperation" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "properties": { + "done": { + "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.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "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 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" + }, + "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 be a resource name ending with `operations/{unique_id}`.", + "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 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" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "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). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "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 message 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 user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleTypeExpr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "GoogleTypeExpr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "Tunnelv1ProtoTunnelerError": { + "description": "TunnelerError is an error proto for errors returned by the connection manager.", + "id": "Tunnelv1ProtoTunnelerError", + "properties": { + "err": { + "description": "Original raw error", + "type": "string" + }, + "retryable": { + "description": "retryable isn't used for now, but we may want to reuse it in the future.", + "type": "boolean" + } + }, + "type": "object" + }, + "Tunnelv1ProtoTunnelerInfo": { + "description": "TunnelerInfo contains metadata about tunneler launched by connection manager.", + "id": "Tunnelv1ProtoTunnelerInfo", + "properties": { + "backoffRetryCount": { + "description": "backoff_retry_count stores the number of times the tunneler has been retried by tunManager for current backoff sequence. Gets reset to 0 if time difference between 2 consecutive retries exceeds backoffRetryResetTime.", + "format": "uint32", + "type": "integer" + }, + "id": { + "description": "id is the unique id of a tunneler.", + "type": "string" + }, + "latestErr": { + "$ref": "Tunnelv1ProtoTunnelerError", + "description": "latest_err stores the Error for the latest tunneler failure. Gets reset everytime the tunneler is retried by tunManager." + }, + "latestRetryTime": { + "description": "latest_retry_time stores the time when the tunneler was last restarted.", + "format": "google-datetime", + "type": "string" + }, + "totalRetryCount": { + "description": "total_retry_count stores the total number of times the tunneler has been retried by tunManager.", + "format": "uint32", + "type": "integer" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "BeyondCorp API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/beyondcorp/v1/beyondcorp-gen.go b/beyondcorp/v1/beyondcorp-gen.go new file mode 100644 index 00000000000..d0415eec658 --- /dev/null +++ b/beyondcorp/v1/beyondcorp-gen.go @@ -0,0 +1,5006 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package beyondcorp provides access to the BeyondCorp API. +// +// For product documentation, see: https://cloud.google.com/ +// +// Creating a client +// +// Usage example: +// +// import "google.golang.org/api/beyondcorp/v1" +// ... +// ctx := context.Background() +// beyondcorpService, err := beyondcorp.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// beyondcorpService, err := beyondcorp.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// beyondcorpService, err := beyondcorp.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package beyondcorp // import "google.golang.org/api/beyondcorp/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// 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 +var _ = internaloption.WithDefaultEndpoint + +const apiId = "beyondcorp:v1" +const apiName = "beyondcorp" +const apiVersion = "v1" +const basePath = "https://beyondcorp.googleapis.com/" +const mtlsBasePath = "https://beyondcorp.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +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.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.AppConnections = NewProjectsLocationsAppConnectionsService(s) + rs.AppConnectors = NewProjectsLocationsAppConnectorsService(s) + rs.AppGateways = NewProjectsLocationsAppGatewaysService(s) + rs.ClientConnectorServices = NewProjectsLocationsClientConnectorServicesService(s) + rs.ClientGateways = NewProjectsLocationsClientGatewaysService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + AppConnections *ProjectsLocationsAppConnectionsService + + AppConnectors *ProjectsLocationsAppConnectorsService + + AppGateways *ProjectsLocationsAppGatewaysService + + ClientConnectorServices *ProjectsLocationsClientConnectorServicesService + + ClientGateways *ProjectsLocationsClientGatewaysService + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsAppConnectionsService(s *Service) *ProjectsLocationsAppConnectionsService { + rs := &ProjectsLocationsAppConnectionsService{s: s} + return rs +} + +type ProjectsLocationsAppConnectionsService struct { + s *Service +} + +func NewProjectsLocationsAppConnectorsService(s *Service) *ProjectsLocationsAppConnectorsService { + rs := &ProjectsLocationsAppConnectorsService{s: s} + return rs +} + +type ProjectsLocationsAppConnectorsService struct { + s *Service +} + +func NewProjectsLocationsAppGatewaysService(s *Service) *ProjectsLocationsAppGatewaysService { + rs := &ProjectsLocationsAppGatewaysService{s: s} + return rs +} + +type ProjectsLocationsAppGatewaysService struct { + s *Service +} + +func NewProjectsLocationsClientConnectorServicesService(s *Service) *ProjectsLocationsClientConnectorServicesService { + rs := &ProjectsLocationsClientConnectorServicesService{s: s} + return rs +} + +type ProjectsLocationsClientConnectorServicesService struct { + s *Service +} + +func NewProjectsLocationsClientGatewaysService(s *Service) *ProjectsLocationsClientGatewaysService { + rs := &ProjectsLocationsClientGatewaysService{s: s} + return rs +} + +type ProjectsLocationsClientGatewaysService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +// CloudSecurityZerotrustApplinkAppConnectorProtoConnectionConfig: +// ConnectionConfig represents a Connection Configuration object. +type CloudSecurityZerotrustApplinkAppConnectorProtoConnectionConfig struct { + // ApplicationEndpoint: application_endpoint is the endpoint of the + // application the form of host:port. For example, "localhost:80". + ApplicationEndpoint string `json:"applicationEndpoint,omitempty"` + + // ApplicationName: application_name represents the given name of the + // application the connection is connecting with. + ApplicationName string `json:"applicationName,omitempty"` + + // Gateway: gateway lists all instances running a gateway in GCP. They + // all connect to a connector on the host. + Gateway []*CloudSecurityZerotrustApplinkAppConnectorProtoGateway `json:"gateway,omitempty"` + + // Name: name is the unique ID for each connection. TODO(b/190732451) + // returns connection name from user-specified name in config. Now, name + // = ${application_name}:${application_endpoint} + Name string `json:"name,omitempty"` + + // Project: project represents the consumer project the connection + // belongs to. + Project string `json:"project,omitempty"` + + // TunnelsPerGateway: tunnels_per_gateway reflects the number of tunnels + // between a connector and a gateway. + TunnelsPerGateway int64 `json:"tunnelsPerGateway,omitempty"` + + // UserPort: user_port specifies the reserved port on gateways for user + // connections. + UserPort int64 `json:"userPort,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApplicationEndpoint") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApplicationEndpoint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *CloudSecurityZerotrustApplinkAppConnectorProtoConnectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod CloudSecurityZerotrustApplinkAppConnectorProtoConnectionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CloudSecurityZerotrustApplinkAppConnectorProtoConnectorDetails: +// ConnectorDetails reflects the details of a connector. +type CloudSecurityZerotrustApplinkAppConnectorProtoConnectorDetails struct { +} + +// CloudSecurityZerotrustApplinkAppConnectorProtoGateway: Gateway +// represents a GCE VM Instance endpoint for use by IAP TCP. +type CloudSecurityZerotrustApplinkAppConnectorProtoGateway struct { + // Interface: interface specifies the network interface of the gateway + // to connect to. + Interface string `json:"interface,omitempty"` + + // Name: name is the name of an instance running a gateway. It is the + // unique ID for a gateway. All gateways under the same connection have + // the same prefix. It is derived from the gateway URL. For example, + // name=${instance} assuming a gateway URL. + // https://www.googleapis.com/compute/${version}/projects/${project}/zones/${zone}/instances/${instance} + Name string `json:"name,omitempty"` + + // Port: port specifies the port of the gateway for tunnel connections + // from the connectors. + Port int64 `json:"port,omitempty"` + + // Project: project is the tenant project the gateway belongs to. + // Different from the project in the connection, it is a BeyondCorpAPI + // internally created project to manage all the gateways. It is sharing + // the same network with the consumer project user owned. It is derived + // from the gateway URL. For example, project=${project} assuming a + // gateway URL. + // https://www.googleapis.com/compute/${version}/projects/${project}/zones/${zone}/instances/${instance} + Project string `json:"project,omitempty"` + + // SelfLink: self_link is the gateway URL in the form + // https://www.googleapis.com/compute/${version}/projects/${project}/zones/${zone}/instances/${instance} + SelfLink string `json:"selfLink,omitempty"` + + // Zone: zone represents the zone the instance belongs. It is derived + // from the gateway URL. For example, zone=${zone} assuming a gateway + // URL. + // https://www.googleapis.com/compute/${version}/projects/${project}/zones/${zone}/instances/${instance} + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Interface") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Interface") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CloudSecurityZerotrustApplinkAppConnectorProtoGateway) MarshalJSON() ([]byte, error) { + type NoMethod CloudSecurityZerotrustApplinkAppConnectorProtoGateway + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CloudSecurityZerotrustApplinkLogagentProtoLogAgentDetails: +// LogAgentDetails reflects the details of a log agent. +type CloudSecurityZerotrustApplinkLogagentProtoLogAgentDetails struct { +} + +// 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); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnectionOperationMetada +// ta: Represents the metadata of the long-running operation. +type GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnectionOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnectionOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnectionOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnectorOperationMetadata +// : Represents the metadata of the long-running operation. +type GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnectorOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnectorOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnectorOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpAppconnectorsV1alphaContainerHealthDetails: +// ContainerHealthDetails reflects the health details of a container. +type GoogleCloudBeyondcorpAppconnectorsV1alphaContainerHealthDetails struct { + // CurrentConfigVersion: The version of the current config. + CurrentConfigVersion string `json:"currentConfigVersion,omitempty"` + + // ErrorMsg: The latest error message. + ErrorMsg string `json:"errorMsg,omitempty"` + + // ExpectedConfigVersion: The version of the expected config. + ExpectedConfigVersion string `json:"expectedConfigVersion,omitempty"` + + // ExtendedStatus: The extended status. Such as ExitCode, StartedAt, + // FinishedAt, etc. + ExtendedStatus map[string]string `json:"extendedStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CurrentConfigVersion") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CurrentConfigVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpAppconnectorsV1alphaContainerHealthDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpAppconnectorsV1alphaContainerHealthDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpAppconnectorsV1alphaRemoteAgentDetails: +// RemoteAgentDetails reflects the details of a remote agent. +type GoogleCloudBeyondcorpAppconnectorsV1alphaRemoteAgentDetails struct { +} + +// GoogleCloudBeyondcorpAppgatewaysV1alphaAppGatewayOperationMetadata: +// Represents the metadata of the long-running operation. +type GoogleCloudBeyondcorpAppgatewaysV1alphaAppGatewayOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpAppgatewaysV1alphaAppGatewayOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpAppgatewaysV1alphaAppGatewayOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata: +// Represents the metadata of the long-running operation. +type GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata struct { + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been + // cancelled successfully have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpClientconnectorservicesV1alphaClientConnectorServ +// iceOperationMetadata: Represents the metadata of the long-running +// operation. +type GoogleCloudBeyondcorpClientconnectorservicesV1alphaClientConnectorServiceOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpClientconnectorservicesV1alphaClientConnectorServiceOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpClientconnectorservicesV1alphaClientConnectorServiceOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpClientgatewaysV1alphaClientGatewayOperationMetada +// ta: Represents the metadata of the long-running operation. +type GoogleCloudBeyondcorpClientgatewaysV1alphaClientGatewayOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been + // cancelled successfully have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpClientgatewaysV1alphaClientGatewayOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpClientgatewaysV1alphaClientGatewayOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpConnectionsV1alphaConnectionOperationMetadata: +// Represents the metadata of the long-running operation. +type GoogleCloudBeyondcorpConnectionsV1alphaConnectionOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpConnectionsV1alphaConnectionOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpConnectionsV1alphaConnectionOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpConnectorsV1alphaConnectorOperationMetadata: +// Represents the metadata of the long-running operation. +type GoogleCloudBeyondcorpConnectorsV1alphaConnectorOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpConnectorsV1alphaConnectorOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpConnectorsV1alphaConnectorOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpConnectorsV1alphaContainerHealthDetails: +// ContainerHealthDetails reflects the health details of a container. +type GoogleCloudBeyondcorpConnectorsV1alphaContainerHealthDetails struct { + // CurrentConfigVersion: The version of the current config. + CurrentConfigVersion string `json:"currentConfigVersion,omitempty"` + + // ErrorMsg: The latest error message. + ErrorMsg string `json:"errorMsg,omitempty"` + + // ExpectedConfigVersion: The version of the expected config. + ExpectedConfigVersion string `json:"expectedConfigVersion,omitempty"` + + // ExtendedStatus: The extended status. Such as ExitCode, StartedAt, + // FinishedAt, etc. + ExtendedStatus map[string]string `json:"extendedStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CurrentConfigVersion") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CurrentConfigVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpConnectorsV1alphaContainerHealthDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpConnectorsV1alphaContainerHealthDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpConnectorsV1alphaRemoteAgentDetails: +// RemoteAgentDetails reflects the details of a remote agent. +type GoogleCloudBeyondcorpConnectorsV1alphaRemoteAgentDetails struct { +} + +// GoogleCloudLocationListLocationsResponse: The response message for +// Locations.ListLocations. +type GoogleCloudLocationListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*GoogleCloudLocationLocation `json:"locations,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. "Locations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudLocationListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationLocation: A resource that represents Google Cloud +// Platform location. +type GoogleCloudLocationLocation struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + 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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationLocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditConfig: Specifies the audit configuration for a +// service. The configuration determines which permission types are +// logged, and what identities, if any, are exempted from logging. An +// AuditConfig must have one or more AuditLogConfigs. If there are +// AuditConfigs for both `allServices` and a specific service, the union +// of the two AuditConfigs is used for that service: the log_types +// specified in each AuditConfig are enabled, and the exempted_members +// in each AuditLogConfig are exempted. Example Policy with multiple +// AuditConfigs: { "audit_configs": [ { "service": "allServices", +// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": +// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { +// "log_type": "ADMIN_READ" } ] }, { "service": +// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": +// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ +// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy +// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts +// `jose@example.com` from DATA_READ logging, and `aliya@example.com` +// from DATA_WRITE logging. +type GoogleIamV1AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: Specifies a service that will be enabled for audit logging. + // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditLogConfig: Provides the configuration for logging a +// type of permissions. Example: { "audit_log_configs": [ { "log_type": +// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { +// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and +// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ +// logging. +type GoogleIamV1AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Binding: Associates `members`, or principals, with a +// `role`. +type GoogleIamV1Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the + // current request. If the condition evaluates to `false`, then this + // binding does not apply to the current request. However, a different + // role binding might grant the same role to one or more of the + // principals in this binding. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *GoogleTypeExpr `json:"condition,omitempty"` + + // Members: Specifies the principals requesting access for a Google + // Cloud 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@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`. * `deleted:user:{emailid}?uid={uniqueid}`: An + // email address (plus unique identifier) representing a user that has + // been recently deleted. For example, + // `alice@example.com?uid=123456789012345678901`. If the user is + // recovered, this value reverts to `user:{emailid}` and the recovered + // user retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address + // (plus unique identifier) representing a service account that has been + // recently deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + // If the service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains + // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: + // An email address (plus unique identifier) representing a Google group + // that has been recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is + // recovered, this value reverts to `group:{emailid}` and the recovered + // group retains the role in the binding. * `domain:{domain}`: The G + // Suite domain (primary) 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 the list of `members`, or principals. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Policy: An Identity and Access Management (IAM) policy, +// which specifies access controls for Google Cloud resources. A +// `Policy` is a collection of `bindings`. A `binding` binds one or more +// `members`, or principals, to a single `role`. Principals can be user +// accounts, service accounts, Google groups, and domains (such as G +// Suite). A `role` is a named list of permissions; each `role` can be +// an IAM predefined role or a user-created custom role. For some types +// of Google Cloud resources, a `binding` can also specify a +// `condition`, which is a logical expression that allows access to a +// resource only if the expression evaluates to `true`. A condition can +// add constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// For a description of IAM and its features, see the IAM documentation +// (https://cloud.google.com/iam/docs/). +type GoogleIamV1Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*GoogleIamV1Binding `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. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + 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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleIamV1Policy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1SetIamPolicyRequest: Request message for `SetIamPolicy` +// method. +type GoogleIamV1SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *GoogleIamV1Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1TestIamPermissionsRequest: Request message for +// `TestIamPermissions` method. +type GoogleIamV1TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + 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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleIamV1TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1TestIamPermissionsResponse: Response message for +// `TestIamPermissions` method. +type GoogleIamV1TestIamPermissionsResponse 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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleIamV1TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// 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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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: 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 be a resource name ending with + // `operations/{unique_id}`. + 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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +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 or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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) +} + +// GoogleTypeExpr: Represents a textual expression in the Common +// Expression Language (CEL) syntax. CEL is a C-like expression +// language. The syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec. Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type GoogleTypeExpr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleTypeExpr) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeExpr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Tunnelv1ProtoTunnelerError: TunnelerError is an error proto for +// errors returned by the connection manager. +type Tunnelv1ProtoTunnelerError struct { + // Err: Original raw error + Err string `json:"err,omitempty"` + + // Retryable: retryable isn't used for now, but we may want to reuse it + // in the future. + Retryable bool `json:"retryable,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Err") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Err") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Tunnelv1ProtoTunnelerError) MarshalJSON() ([]byte, error) { + type NoMethod Tunnelv1ProtoTunnelerError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Tunnelv1ProtoTunnelerInfo: TunnelerInfo contains metadata about +// tunneler launched by connection manager. +type Tunnelv1ProtoTunnelerInfo struct { + // BackoffRetryCount: backoff_retry_count stores the number of times the + // tunneler has been retried by tunManager for current backoff sequence. + // Gets reset to 0 if time difference between 2 consecutive retries + // exceeds backoffRetryResetTime. + BackoffRetryCount int64 `json:"backoffRetryCount,omitempty"` + + // Id: id is the unique id of a tunneler. + Id string `json:"id,omitempty"` + + // LatestErr: latest_err stores the Error for the latest tunneler + // failure. Gets reset everytime the tunneler is retried by tunManager. + LatestErr *Tunnelv1ProtoTunnelerError `json:"latestErr,omitempty"` + + // LatestRetryTime: latest_retry_time stores the time when the tunneler + // was last restarted. + LatestRetryTime string `json:"latestRetryTime,omitempty"` + + // TotalRetryCount: total_retry_count stores the total number of times + // the tunneler has been retried by tunManager. + TotalRetryCount int64 `json:"totalRetryCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackoffRetryCount") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BackoffRetryCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Tunnelv1ProtoTunnelerInfo) MarshalJSON() ([]byte, error) { + type NoMethod Tunnelv1ProtoTunnelerInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "beyondcorp.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "beyondcorp.projects.locations.get" call. +// Exactly one of *GoogleCloudLocationLocation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudLocationLocation.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudLocationLocation{ + ServerResponse: googleapi.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 information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudLocationLocation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "beyondcorp.projects.locations.list" call. +// Exactly one of *GoogleCloudLocationListLocationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudLocationListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudLocationListLocationsResponse{ + ServerResponse: googleapi.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 information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "GoogleCloudLocationListLocationsResponse" + // }, + // "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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) 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 "beyondcorp.projects.locations.appConnections.getIamPolicy": + +type ProjectsLocationsAppConnectionsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAppConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsAppConnectionsGetIamPolicyCall { + c := &ProjectsLocationsAppConnectionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAppConnectionsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsGetIamPolicyCall { + 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 *ProjectsLocationsAppConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectionsGetIamPolicyCall { + 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 *ProjectsLocationsAppConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.appConnections.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsAppConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.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. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.appConnections.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.appConnections.setIamPolicy": + +type ProjectsLocationsAppConnectionsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAppConnectionsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAppConnectionsSetIamPolicyCall { + c := &ProjectsLocationsAppConnectionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAppConnectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsSetIamPolicyCall { + 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 *ProjectsLocationsAppConnectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAppConnectionsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAppConnectionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleiamv1setiampolicyrequest) + 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, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.appConnections.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsAppConnectionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.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. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.appConnections.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.appConnections.testIamPermissions": + +type ProjectsLocationsAppConnectionsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAppConnectionsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAppConnectionsTestIamPermissionsCall { + c := &ProjectsLocationsAppConnectionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAppConnectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsTestIamPermissionsCall { + 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 *ProjectsLocationsAppConnectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAppConnectionsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAppConnectionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleiamv1testiampermissionsrequest) + 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, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.appConnections.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsAppConnectionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.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. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.appConnections.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.appConnectors.getIamPolicy": + +type ProjectsLocationsAppConnectorsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAppConnectorsService) GetIamPolicy(resource string) *ProjectsLocationsAppConnectorsGetIamPolicyCall { + c := &ProjectsLocationsAppConnectorsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAppConnectorsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsGetIamPolicyCall { + 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 *ProjectsLocationsAppConnectorsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectorsGetIamPolicyCall { + 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 *ProjectsLocationsAppConnectorsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.appConnectors.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsAppConnectorsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.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. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.appConnectors.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.appConnectors.setIamPolicy": + +type ProjectsLocationsAppConnectorsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAppConnectorsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAppConnectorsSetIamPolicyCall { + c := &ProjectsLocationsAppConnectorsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsSetIamPolicyCall { + 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 *ProjectsLocationsAppConnectorsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleiamv1setiampolicyrequest) + 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, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.appConnectors.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsAppConnectorsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.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. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.appConnectors.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.appConnectors.testIamPermissions": + +type ProjectsLocationsAppConnectorsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAppConnectorsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAppConnectorsTestIamPermissionsCall { + c := &ProjectsLocationsAppConnectorsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsTestIamPermissionsCall { + 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 *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleiamv1testiampermissionsrequest) + 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, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.appConnectors.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.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. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.appConnectors.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.appGateways.getIamPolicy": + +type ProjectsLocationsAppGatewaysGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAppGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsAppGatewaysGetIamPolicyCall { + c := &ProjectsLocationsAppGatewaysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAppGatewaysGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysGetIamPolicyCall { + 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 *ProjectsLocationsAppGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppGatewaysGetIamPolicyCall { + 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 *ProjectsLocationsAppGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.appGateways.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsAppGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.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. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.appGateways.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.appGateways.setIamPolicy": + +type ProjectsLocationsAppGatewaysSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAppGatewaysService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAppGatewaysSetIamPolicyCall { + c := &ProjectsLocationsAppGatewaysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAppGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysSetIamPolicyCall { + 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 *ProjectsLocationsAppGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAppGatewaysSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAppGatewaysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleiamv1setiampolicyrequest) + 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, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.appGateways.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsAppGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.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. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.appGateways.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.appGateways.testIamPermissions": + +type ProjectsLocationsAppGatewaysTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAppGatewaysService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAppGatewaysTestIamPermissionsCall { + c := &ProjectsLocationsAppGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysTestIamPermissionsCall { + 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 *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleiamv1testiampermissionsrequest) + 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, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.appGateways.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.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. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.appGateways.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy": + +type ProjectsLocationsClientConnectorServicesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsClientConnectorServicesService) GetIamPolicy(resource string) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { + c := &ProjectsLocationsClientConnectorServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { + 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 *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { + 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 *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.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. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy": + +type ProjectsLocationsClientConnectorServicesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsClientConnectorServicesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { + c := &ProjectsLocationsClientConnectorServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { + 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 *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleiamv1setiampolicyrequest) + 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, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.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. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions": + +type ProjectsLocationsClientConnectorServicesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsClientConnectorServicesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { + c := &ProjectsLocationsClientConnectorServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { + 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 *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleiamv1testiampermissionsrequest) + 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, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.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. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.clientGateways.getIamPolicy": + +type ProjectsLocationsClientGatewaysGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsClientGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsClientGatewaysGetIamPolicyCall { + c := &ProjectsLocationsClientGatewaysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsClientGatewaysGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysGetIamPolicyCall { + 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 *ProjectsLocationsClientGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientGatewaysGetIamPolicyCall { + 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 *ProjectsLocationsClientGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.clientGateways.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsClientGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.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. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.clientGateways.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.clientGateways.setIamPolicy": + +type ProjectsLocationsClientGatewaysSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsClientGatewaysService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsClientGatewaysSetIamPolicyCall { + c := &ProjectsLocationsClientGatewaysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysSetIamPolicyCall { + 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 *ProjectsLocationsClientGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleiamv1setiampolicyrequest) + 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, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.clientGateways.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsClientGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.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. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.clientGateways.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.clientGateways.testIamPermissions": + +type ProjectsLocationsClientGatewaysTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsClientGatewaysService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsClientGatewaysTestIamPermissionsCall { + c := &ProjectsLocationsClientGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysTestIamPermissionsCall { + 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 *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleiamv1testiampermissionsrequest) + 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, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.clientGateways.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.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. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.clientGateways.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + 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.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{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 *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + 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 "beyondcorp.projects.locations.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 *ProjectsLocationsOperationsCancelCall) 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.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "GoogleLongrunningCancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall 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`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{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 *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + 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 *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + 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 "beyondcorp.projects.locations.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 *ProjectsLocationsOperationsDeleteCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "beyondcorp.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall 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. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{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 *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "beyondcorp.projects.locations.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 *ProjectsLocationsOperationsGetCall) 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 method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall 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 allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "beyondcorp.projects.locations.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 *ProjectsLocationsOperationsListCall) 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": "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 allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.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": "^projects/[^/]+/locations/[^/]+$", + // "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": "v1/{+name}/operations", + // "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 *ProjectsLocationsOperationsListCall) 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) + } +} diff --git a/beyondcorp/v1alpha/beyondcorp-api.json b/beyondcorp/v1alpha/beyondcorp-api.json index 89e4dc786b0..76b9a055478 100644 --- a/beyondcorp/v1alpha/beyondcorp-api.json +++ b/beyondcorp/v1alpha/beyondcorp-api.json @@ -189,7 +189,7 @@ ], "parameters": { "appConnectionId": { - "description": "Optional. User-settable AppConnection resource ID. * Must start with a letter. * Must contain between 4-63 characters from (/a-z-/). * Must end with a number or a letter.", + "description": "Optional. User-settable AppConnection resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", "location": "query", "type": "string" }, @@ -519,7 +519,7 @@ ], "parameters": { "appConnectorId": { - "description": "Optional. User-settable AppConnector resource ID. * Must start with a letter. * Must contain between 4-63 characters from (/a-z-/). * Must end with a number or a letter.", + "description": "Optional. User-settable AppConnector resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", "location": "query", "type": "string" }, @@ -856,7 +856,7 @@ ], "parameters": { "appGatewayId": { - "description": "Optional. User-settable AppGateway resource ID. * Must start with a letter. * Must contain between 4-63 characters from (/a-z-/). * Must end with a number or a letter.", + "description": "Optional. User-settable AppGateway resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", "location": "query", "type": "string" }, @@ -1084,6 +1084,97 @@ } } }, + "applications": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:getIamPolicy", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.applications.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:setIamPolicy", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.applications.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:testIamPermissions", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.applications.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "clientConnectorServices": { "methods": { "create": { @@ -1096,7 +1187,7 @@ ], "parameters": { "clientConnectorServiceId": { - "description": "Optional. User-settable client connector service resource ID. * Must start with a letter. * Must contain between 4-63 characters from (/a-z-/). * Must end with a number or a letter. A random system generated name will be assigned if not specified by the user.", + "description": "Optional. User-settable client connector service resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter. A random system generated name will be assigned if not specified by the user.", "location": "query", "type": "string" }, @@ -1385,7 +1476,7 @@ ], "parameters": { "clientGatewayId": { - "description": "Optional. User-settable client gateway resource ID. * Must start with a letter. * Must contain between 4-63 characters from (/a-z-/). * Must end with a number or a letter.", + "description": "Optional. User-settable client gateway resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", "location": "query", "type": "string" }, @@ -1625,7 +1716,7 @@ ], "parameters": { "connectionId": { - "description": "Optional. User-settable connection resource ID. * Must start with a letter. * Must contain between 4-63 characters from (/a-z-/). * Must end with a number or a letter.", + "description": "Optional. User-settable connection resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", "location": "query", "type": "string" }, @@ -1955,7 +2046,7 @@ ], "parameters": { "connectorId": { - "description": "Optional. User-settable connector resource ID. * Must start with a letter. * Must contain between 4-63 characters from (/a-z-/). * Must end with a number or a letter.", + "description": "Optional. User-settable connector resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", "location": "query", "type": "string" }, @@ -2408,7 +2499,7 @@ } } }, - "revision": "20220504", + "revision": "20220616", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -3695,16 +3786,42 @@ }, "type": "object" }, + "GoogleCloudBeyondcorpAppconnectorsV1alphaContainerHealthDetails": { + "description": "ContainerHealthDetails reflects the health details of a container.", + "id": "GoogleCloudBeyondcorpAppconnectorsV1alphaContainerHealthDetails", + "properties": { + "currentConfigVersion": { + "description": "The version of the current config.", + "type": "string" + }, + "errorMsg": { + "description": "The latest error message.", + "type": "string" + }, + "expectedConfigVersion": { + "description": "The version of the expected config.", + "type": "string" + }, + "extendedStatus": { + "additionalProperties": { + "type": "string" + }, + "description": "The extended status. Such as ExitCode, StartedAt, FinishedAt, etc.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudBeyondcorpAppconnectorsV1alphaImageConfig": { "description": "ImageConfig defines the control plane images to run.", "id": "GoogleCloudBeyondcorpAppconnectorsV1alphaImageConfig", "properties": { "stableImage": { - "description": "The stable image that the remote agent will fallback to if the target image fails.", + "description": "The stable image that the remote agent will fallback to if the target image fails. Format would be a gcr image path, e.g.: gcr.io/PROJECT-ID/my-image:tag1", "type": "string" }, "targetImage": { - "description": "The initial image the remote agent will attempt to run for the control plane.", + "description": "The initial image the remote agent will attempt to run for the control plane. Format would be a gcr image path, e.g.: gcr.io/PROJECT-ID/my-image:tag1", "type": "string" } }, @@ -3741,7 +3858,7 @@ "properties": { "pubsubNotification": { "$ref": "GoogleCloudBeyondcorpAppconnectorsV1alphaNotificationConfigCloudPubSubNotificationConfig", - "description": "Pub/Sub topic for AppConnector to subscribe and receive notifications from `projects/{project}/topics/{pubsub_topic}`" + "description": "Cloud Pub/Sub Configuration to receive notifications." } }, "type": "object" @@ -3757,6 +3874,12 @@ }, "type": "object" }, + "GoogleCloudBeyondcorpAppconnectorsV1alphaRemoteAgentDetails": { + "description": "RemoteAgentDetails reflects the details of a remote agent.", + "id": "GoogleCloudBeyondcorpAppconnectorsV1alphaRemoteAgentDetails", + "properties": {}, + "type": "object" + }, "GoogleCloudBeyondcorpAppconnectorsV1alphaReportStatusRequest": { "description": "Request report the connector status.", "id": "GoogleCloudBeyondcorpAppconnectorsV1alphaReportStatusRequest", @@ -3817,7 +3940,7 @@ "The resource is healthy.", "The resource is unhealthy.", "The resource is unresponsive.", - "The resource is some sub-resources are UNHEALTHY." + "Some sub-resources are UNHEALTHY." ], "type": "string" }, @@ -3836,6 +3959,45 @@ }, "type": "object" }, + "GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata", + "properties": { + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudLocationListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "GoogleCloudLocationListLocationsResponse", @@ -4417,7 +4579,7 @@ "The resource is healthy.", "The resource is unhealthy.", "The resource is unresponsive.", - "The resource is some sub-resources are UNHEALTHY." + "Some sub-resources are UNHEALTHY." ], "type": "string" }, diff --git a/beyondcorp/v1alpha/beyondcorp-gen.go b/beyondcorp/v1alpha/beyondcorp-gen.go index 4ba43a5d981..2e565faef43 100644 --- a/beyondcorp/v1alpha/beyondcorp-gen.go +++ b/beyondcorp/v1alpha/beyondcorp-gen.go @@ -154,6 +154,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.AppConnections = NewProjectsLocationsAppConnectionsService(s) rs.AppConnectors = NewProjectsLocationsAppConnectorsService(s) rs.AppGateways = NewProjectsLocationsAppGatewaysService(s) + rs.Applications = NewProjectsLocationsApplicationsService(s) rs.ClientConnectorServices = NewProjectsLocationsClientConnectorServicesService(s) rs.ClientGateways = NewProjectsLocationsClientGatewaysService(s) rs.Connections = NewProjectsLocationsConnectionsService(s) @@ -171,6 +172,8 @@ type ProjectsLocationsService struct { AppGateways *ProjectsLocationsAppGatewaysService + Applications *ProjectsLocationsApplicationsService + ClientConnectorServices *ProjectsLocationsClientConnectorServicesService ClientGateways *ProjectsLocationsClientGatewaysService @@ -209,6 +212,15 @@ type ProjectsLocationsAppGatewaysService struct { s *Service } +func NewProjectsLocationsApplicationsService(s *Service) *ProjectsLocationsApplicationsService { + rs := &ProjectsLocationsApplicationsService{s: s} + return rs +} + +type ProjectsLocationsApplicationsService struct { + s *Service +} + func NewProjectsLocationsClientConnectorServicesService(s *Service) *ProjectsLocationsClientConnectorServicesService { rs := &ProjectsLocationsClientConnectorServicesService{s: s} return rs @@ -1976,15 +1988,58 @@ func (s *GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnectorPrincipalInfoServi return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudBeyondcorpAppconnectorsV1alphaContainerHealthDetails: +// ContainerHealthDetails reflects the health details of a container. +type GoogleCloudBeyondcorpAppconnectorsV1alphaContainerHealthDetails struct { + // CurrentConfigVersion: The version of the current config. + CurrentConfigVersion string `json:"currentConfigVersion,omitempty"` + + // ErrorMsg: The latest error message. + ErrorMsg string `json:"errorMsg,omitempty"` + + // ExpectedConfigVersion: The version of the expected config. + ExpectedConfigVersion string `json:"expectedConfigVersion,omitempty"` + + // ExtendedStatus: The extended status. Such as ExitCode, StartedAt, + // FinishedAt, etc. + ExtendedStatus map[string]string `json:"extendedStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CurrentConfigVersion") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CurrentConfigVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpAppconnectorsV1alphaContainerHealthDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpAppconnectorsV1alphaContainerHealthDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudBeyondcorpAppconnectorsV1alphaImageConfig: ImageConfig // defines the control plane images to run. type GoogleCloudBeyondcorpAppconnectorsV1alphaImageConfig struct { // StableImage: The stable image that the remote agent will fallback to - // if the target image fails. + // if the target image fails. Format would be a gcr image path, e.g.: + // gcr.io/PROJECT-ID/my-image:tag1 StableImage string `json:"stableImage,omitempty"` // TargetImage: The initial image the remote agent will attempt to run - // for the control plane. + // for the control plane. Format would be a gcr image path, e.g.: + // gcr.io/PROJECT-ID/my-image:tag1 TargetImage string `json:"targetImage,omitempty"` // ForceSendFields is a list of field names (e.g. "StableImage") to @@ -2053,8 +2108,8 @@ func (s *GoogleCloudBeyondcorpAppconnectorsV1alphaListAppConnectorsResponse) Mar // GoogleCloudBeyondcorpAppconnectorsV1alphaNotificationConfig: // NotificationConfig defines the mechanisms to notify instance agent. type GoogleCloudBeyondcorpAppconnectorsV1alphaNotificationConfig struct { - // PubsubNotification: Pub/Sub topic for AppConnector to subscribe and - // receive notifications from `projects/{project}/topics/{pubsub_topic}` + // PubsubNotification: Cloud Pub/Sub Configuration to receive + // notifications. PubsubNotification *GoogleCloudBeyondcorpAppconnectorsV1alphaNotificationConfigCloudPubSubNotificationConfig `json:"pubsubNotification,omitempty"` // ForceSendFields is a list of field names (e.g. "PubsubNotification") @@ -2113,6 +2168,11 @@ func (s *GoogleCloudBeyondcorpAppconnectorsV1alphaNotificationConfigCloudPubSubN return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudBeyondcorpAppconnectorsV1alphaRemoteAgentDetails: +// RemoteAgentDetails reflects the details of a remote agent. +type GoogleCloudBeyondcorpAppconnectorsV1alphaRemoteAgentDetails struct { +} + // GoogleCloudBeyondcorpAppconnectorsV1alphaReportStatusRequest: Request // report the connector status. type GoogleCloudBeyondcorpAppconnectorsV1alphaReportStatusRequest struct { @@ -2215,7 +2275,7 @@ type GoogleCloudBeyondcorpAppconnectorsV1alphaResourceInfo struct { // "HEALTHY" - The resource is healthy. // "UNHEALTHY" - The resource is unhealthy. // "UNRESPONSIVE" - The resource is unresponsive. - // "DEGRADED" - The resource is some sub-resources are UNHEALTHY. + // "DEGRADED" - Some sub-resources are UNHEALTHY. Status string `json:"status,omitempty"` // Sub: List of Info for the sub level resources. @@ -2248,6 +2308,55 @@ func (s *GoogleCloudBeyondcorpAppconnectorsV1alphaResourceInfo) MarshalJSON() ([ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata: +// Represents the metadata of the long-running operation. +type GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata struct { + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been + // cancelled successfully have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or 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 *GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudLocationListLocationsResponse: The response message for // Locations.ListLocations. type GoogleCloudLocationListLocationsResponse struct { @@ -3428,7 +3537,7 @@ type ResourceInfo struct { // "HEALTHY" - The resource is healthy. // "UNHEALTHY" - The resource is unhealthy. // "UNRESPONSIVE" - The resource is unresponsive. - // "DEGRADED" - The resource is some sub-resources are UNHEALTHY. + // "DEGRADED" - Some sub-resources are UNHEALTHY. Status string `json:"status,omitempty"` // Sub: List of Info for the sub level resources. @@ -3951,7 +4060,7 @@ func (r *ProjectsLocationsAppConnectionsService) Create(parent string, googleclo // AppConnectionId sets the optional parameter "appConnectionId": // User-settable AppConnection resource ID. * Must start with a letter. -// * Must contain between 4-63 characters from (/a-z-/). * Must end with +// * Must contain between 4-63 characters from `/a-z-/`. * Must end with // a number or a letter. func (c *ProjectsLocationsAppConnectionsCreateCall) AppConnectionId(appConnectionId string) *ProjectsLocationsAppConnectionsCreateCall { c.urlParams_.Set("appConnectionId", appConnectionId) @@ -4084,7 +4193,7 @@ func (c *ProjectsLocationsAppConnectionsCreateCall) Do(opts ...googleapi.CallOpt // ], // "parameters": { // "appConnectionId": { - // "description": "Optional. User-settable AppConnection resource ID. * Must start with a letter. * Must contain between 4-63 characters from (/a-z-/). * Must end with a number or a letter.", + // "description": "Optional. User-settable AppConnection resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", // "location": "query", // "type": "string" // }, @@ -5590,7 +5699,7 @@ func (r *ProjectsLocationsAppConnectorsService) Create(parent string, googleclou // AppConnectorId sets the optional parameter "appConnectorId": // User-settable AppConnector resource ID. * Must start with a letter. * -// Must contain between 4-63 characters from (/a-z-/). * Must end with a +// Must contain between 4-63 characters from `/a-z-/`. * Must end with a // number or a letter. func (c *ProjectsLocationsAppConnectorsCreateCall) AppConnectorId(appConnectorId string) *ProjectsLocationsAppConnectorsCreateCall { c.urlParams_.Set("appConnectorId", appConnectorId) @@ -5723,7 +5832,7 @@ func (c *ProjectsLocationsAppConnectorsCreateCall) Do(opts ...googleapi.CallOpti // ], // "parameters": { // "appConnectorId": { - // "description": "Optional. User-settable AppConnector resource ID. * Must start with a letter. * Must contain between 4-63 characters from (/a-z-/). * Must end with a number or a letter.", + // "description": "Optional. User-settable AppConnector resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", // "location": "query", // "type": "string" // }, @@ -7295,7 +7404,7 @@ func (r *ProjectsLocationsAppGatewaysService) Create(parent string, appgateway * // AppGatewayId sets the optional parameter "appGatewayId": // User-settable AppGateway resource ID. * Must start with a letter. * -// Must contain between 4-63 characters from (/a-z-/). * Must end with a +// Must contain between 4-63 characters from `/a-z-/`. * Must end with a // number or a letter. func (c *ProjectsLocationsAppGatewaysCreateCall) AppGatewayId(appGatewayId string) *ProjectsLocationsAppGatewaysCreateCall { c.urlParams_.Set("appGatewayId", appGatewayId) @@ -7428,7 +7537,7 @@ func (c *ProjectsLocationsAppGatewaysCreateCall) Do(opts ...googleapi.CallOption // ], // "parameters": { // "appGatewayId": { - // "description": "Optional. User-settable AppGateway resource ID. * Must start with a letter. * Must contain between 4-63 characters from (/a-z-/). * Must end with a number or a letter.", + // "description": "Optional. User-settable AppGateway resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", // "location": "query", // "type": "string" // }, @@ -8479,6 +8588,479 @@ func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Do(opts ...googleap } +// method id "beyondcorp.projects.locations.applications.getIamPolicy": + +type ProjectsLocationsApplicationsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsApplicationsService) GetIamPolicy(resource string) *ProjectsLocationsApplicationsGetIamPolicyCall { + c := &ProjectsLocationsApplicationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApplicationsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsGetIamPolicyCall { + 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 *ProjectsLocationsApplicationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsGetIamPolicyCall { + 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 *ProjectsLocationsApplicationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1alpha/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.applications.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.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. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.applications.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.applications.setIamPolicy": + +type ProjectsLocationsApplicationsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsApplicationsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsApplicationsSetIamPolicyCall { + c := &ProjectsLocationsApplicationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsSetIamPolicyCall { + 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 *ProjectsLocationsApplicationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleiamv1setiampolicyrequest) + 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, "v1alpha/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.applications.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.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. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.applications.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.applications.testIamPermissions": + +type ProjectsLocationsApplicationsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsApplicationsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsApplicationsTestIamPermissionsCall { + c := &ProjectsLocationsApplicationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsTestIamPermissionsCall { + 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 *ProjectsLocationsApplicationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApplicationsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.googleiamv1testiampermissionsrequest) + 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, "v1alpha/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.applications.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.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. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.applications.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "beyondcorp.projects.locations.clientConnectorServices.create": type ProjectsLocationsClientConnectorServicesCreateCall struct { @@ -8504,7 +9086,7 @@ func (r *ProjectsLocationsClientConnectorServicesService) Create(parent string, // ClientConnectorServiceId sets the optional parameter // "clientConnectorServiceId": User-settable client connector service // resource ID. * Must start with a letter. * Must contain between 4-63 -// characters from (/a-z-/). * Must end with a number or a letter. A +// characters from `/a-z-/`. * Must end with a number or a letter. A // random system generated name will be assigned if not specified by the // user. func (c *ProjectsLocationsClientConnectorServicesCreateCall) ClientConnectorServiceId(clientConnectorServiceId string) *ProjectsLocationsClientConnectorServicesCreateCall { @@ -8638,7 +9220,7 @@ func (c *ProjectsLocationsClientConnectorServicesCreateCall) Do(opts ...googleap // ], // "parameters": { // "clientConnectorServiceId": { - // "description": "Optional. User-settable client connector service resource ID. * Must start with a letter. * Must contain between 4-63 characters from (/a-z-/). * Must end with a number or a letter. A random system generated name will be assigned if not specified by the user.", + // "description": "Optional. User-settable client connector service resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter. A random system generated name will be assigned if not specified by the user.", // "location": "query", // "type": "string" // }, @@ -9909,7 +10491,7 @@ func (r *ProjectsLocationsClientGatewaysService) Create(parent string, clientgat // ClientGatewayId sets the optional parameter "clientGatewayId": // User-settable client gateway resource ID. * Must start with a letter. -// * Must contain between 4-63 characters from (/a-z-/). * Must end with +// * Must contain between 4-63 characters from `/a-z-/`. * Must end with // a number or a letter. func (c *ProjectsLocationsClientGatewaysCreateCall) ClientGatewayId(clientGatewayId string) *ProjectsLocationsClientGatewaysCreateCall { c.urlParams_.Set("clientGatewayId", clientGatewayId) @@ -10042,7 +10624,7 @@ func (c *ProjectsLocationsClientGatewaysCreateCall) Do(opts ...googleapi.CallOpt // ], // "parameters": { // "clientGatewayId": { - // "description": "Optional. User-settable client gateway resource ID. * Must start with a letter. * Must contain between 4-63 characters from (/a-z-/). * Must end with a number or a letter.", + // "description": "Optional. User-settable client gateway resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", // "location": "query", // "type": "string" // }, @@ -11105,7 +11687,7 @@ func (r *ProjectsLocationsConnectionsService) Create(parent string, connection * // ConnectionId sets the optional parameter "connectionId": // User-settable connection resource ID. * Must start with a letter. * -// Must contain between 4-63 characters from (/a-z-/). * Must end with a +// Must contain between 4-63 characters from `/a-z-/`. * Must end with a // number or a letter. func (c *ProjectsLocationsConnectionsCreateCall) ConnectionId(connectionId string) *ProjectsLocationsConnectionsCreateCall { c.urlParams_.Set("connectionId", connectionId) @@ -11238,7 +11820,7 @@ func (c *ProjectsLocationsConnectionsCreateCall) Do(opts ...googleapi.CallOption // ], // "parameters": { // "connectionId": { - // "description": "Optional. User-settable connection resource ID. * Must start with a letter. * Must contain between 4-63 characters from (/a-z-/). * Must end with a number or a letter.", + // "description": "Optional. User-settable connection resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", // "location": "query", // "type": "string" // }, @@ -12735,7 +13317,7 @@ func (r *ProjectsLocationsConnectorsService) Create(parent string, connector *Co // ConnectorId sets the optional parameter "connectorId": User-settable // connector resource ID. * Must start with a letter. * Must contain -// between 4-63 characters from (/a-z-/). * Must end with a number or a +// between 4-63 characters from `/a-z-/`. * Must end with a number or a // letter. func (c *ProjectsLocationsConnectorsCreateCall) ConnectorId(connectorId string) *ProjectsLocationsConnectorsCreateCall { c.urlParams_.Set("connectorId", connectorId) @@ -12868,7 +13450,7 @@ func (c *ProjectsLocationsConnectorsCreateCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "connectorId": { - // "description": "Optional. User-settable connector resource ID. * Must start with a letter. * Must contain between 4-63 characters from (/a-z-/). * Must end with a number or a letter.", + // "description": "Optional. User-settable connector resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", // "location": "query", // "type": "string" // }, diff --git a/blogger/v2/blogger-api.json b/blogger/v2/blogger-api.json index 9be27b4e4b5..d5a4bd9d42e 100644 --- a/blogger/v2/blogger-api.json +++ b/blogger/v2/blogger-api.json @@ -401,7 +401,7 @@ } } }, - "revision": "20220226", + "revision": "20220625", "rootUrl": "https://blogger.googleapis.com/", "schemas": { "Blog": { @@ -1125,6 +1125,6 @@ } }, "servicePath": "", - "title": "Blogger API v3", + "title": "Blogger API", "version": "v2" } \ No newline at end of file diff --git a/blogger/v2/blogger-gen.go b/blogger/v2/blogger-gen.go index a9c566b681b..fdbbe368f60 100644 --- a/blogger/v2/blogger-gen.go +++ b/blogger/v2/blogger-gen.go @@ -4,7 +4,7 @@ // Code generated file. DO NOT EDIT. -// Package blogger provides access to the Blogger API v3. +// Package blogger provides access to the Blogger API. // // For product documentation, see: https://developers.google.com/blogger/docs/3.0/getting_started // diff --git a/blogger/v3/blogger-api.json b/blogger/v3/blogger-api.json index 04079910979..6e4cc81c421 100644 --- a/blogger/v3/blogger-api.json +++ b/blogger/v3/blogger-api.json @@ -1684,7 +1684,7 @@ } } }, - "revision": "20220226", + "revision": "20220625", "rootUrl": "https://blogger.googleapis.com/", "schemas": { "Blog": { @@ -2515,6 +2515,6 @@ } }, "servicePath": "", - "title": "Blogger API v3", + "title": "Blogger API", "version": "v3" } \ No newline at end of file diff --git a/blogger/v3/blogger-gen.go b/blogger/v3/blogger-gen.go index c6eea34e3a5..b2bdfb316e4 100644 --- a/blogger/v3/blogger-gen.go +++ b/blogger/v3/blogger-gen.go @@ -4,7 +4,7 @@ // Code generated file. DO NOT EDIT. -// Package blogger provides access to the Blogger API v3. +// Package blogger provides access to the Blogger API. // // For product documentation, see: https://developers.google.com/blogger/docs/3.0/getting_started // diff --git a/chromepolicy/v1/chromepolicy-api.json b/chromepolicy/v1/chromepolicy-api.json index 503347fd820..89c8531e1f8 100644 --- a/chromepolicy/v1/chromepolicy-api.json +++ b/chromepolicy/v1/chromepolicy-api.json @@ -324,7 +324,7 @@ } } }, - "revision": "20220612", + "revision": "20220627", "rootUrl": "https://chromepolicy.googleapis.com/", "schemas": { "ChromeCrosDpanelAutosettingsProtoPolicyApiLifecycle": { @@ -1012,7 +1012,7 @@ "type": "string" }, "syntax": { - "description": "The syntax of the proto file. The supported values are \"proto2\" and \"proto3\".", + "description": "The syntax of the proto file. The supported values are \"proto2\", \"proto3\", and \"editions\". If `edition` is present, this value must be \"editions\".", "type": "string" } }, diff --git a/chromepolicy/v1/chromepolicy-gen.go b/chromepolicy/v1/chromepolicy-gen.go index 058e5741161..3c7732021d4 100644 --- a/chromepolicy/v1/chromepolicy-gen.go +++ b/chromepolicy/v1/chromepolicy-gen.go @@ -1311,7 +1311,8 @@ type Proto2FileDescriptorProto struct { Package string `json:"package,omitempty"` // Syntax: The syntax of the proto file. The supported values are - // "proto2" and "proto3". + // "proto2", "proto3", and "editions". If `edition` is present, this + // value must be "editions". Syntax string `json:"syntax,omitempty"` // ForceSendFields is a list of field names (e.g. "EnumType") to diff --git a/cloudchannel/v1/cloudchannel-api.json b/cloudchannel/v1/cloudchannel-api.json index 54207376072..21b24b89b36 100644 --- a/cloudchannel/v1/cloudchannel-api.json +++ b/cloudchannel/v1/cloudchannel-api.json @@ -1901,7 +1901,7 @@ } } }, - "revision": "20220604", + "revision": "20220625", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { @@ -4504,7 +4504,7 @@ "type": "object" }, "GoogleTypePostalAddress": { - "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an i18n-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", + "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", "id": "GoogleTypePostalAddress", "properties": { "addressLines": { diff --git a/cloudchannel/v1/cloudchannel-gen.go b/cloudchannel/v1/cloudchannel-gen.go index a2b945f0659..f361eaaf441 100644 --- a/cloudchannel/v1/cloudchannel-gen.go +++ b/cloudchannel/v1/cloudchannel-gen.go @@ -4724,11 +4724,12 @@ func (s *GoogleTypeMoney) MarshalJSON() ([]byte, error) { // not intended to model geographical locations (roads, towns, // mountains). In typical usage an address would be created via user // input or from importing existing data, depending on the type of -// process. Advice on address input / editing: - Use an i18n-ready -// address widget such as https://github.com/google/libaddressinput) - -// Users should not be presented with UI elements for input or editing -// of fields outside countries where that field is used. For more -// guidance on how to use this schema, please see: +// process. Advice on address input / editing: - Use an +// internationalization-ready address widget such as +// https://github.com/google/libaddressinput) - Users should not be +// presented with UI elements for input or editing of fields outside +// countries where that field is used. For more guidance on how to use +// this schema, please see: // https://support.google.com/business/answer/6397478 type GoogleTypePostalAddress struct { // AddressLines: Unstructured address lines describing the lower levels diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index aa465fbdc00..830919b48ed 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2484,7 +2484,7 @@ } } }, - "revision": "20220518", + "revision": "20220610", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2717,9 +2717,9 @@ "PROJECT_SINGLETON_POLICY_ENFORCE" ], "enumDescriptions": [ - "Default value, equivalent to DISABLED.", + "Default value", "Disable BinaryAuthorization", - "If enabled, enforce Kubernetes admission requests with BinAuthz using the project's singleton policy. Equivalent to bool enabled=true." + "Enforce Kubernetes admission requests with BinaryAuthorization using the project's singleton policy. This is equivalent to setting the enabled boolean to true." ], "type": "string" } @@ -2843,6 +2843,10 @@ "$ref": "ConfidentialNodes", "description": "Configuration of Confidential Nodes. All the nodes in the cluster will be Confidential VM once enabled." }, + "costManagementConfig": { + "$ref": "CostManagementConfig", + "description": "Configuration for the fine-grained cost management feature." + }, "createTime": { "description": "[Output only] The time the cluster was created, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", "type": "string" @@ -3214,6 +3218,10 @@ "$ref": "ClusterTelemetry", "description": "The desired telemetry integration for the cluster." }, + "desiredCostManagementConfig": { + "$ref": "CostManagementConfig", + "description": "The desired configuration for the fine-grained cost management feature." + }, "desiredDatabaseEncryption": { "$ref": "DatabaseEncryption", "description": "Configuration of etcd encryption." @@ -3442,6 +3450,17 @@ }, "type": "object" }, + "CostManagementConfig": { + "description": "Configuration for fine-grained cost management feature.", + "id": "CostManagementConfig", + "properties": { + "enabled": { + "description": "Whether the feature is enabled or not.", + "type": "boolean" + } + }, + "type": "object" + }, "CreateClusterRequest": { "description": "CreateClusterRequest creates a cluster.", "id": "CreateClusterRequest", diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index 52d246db609..e3c5eb2a854 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -705,12 +705,11 @@ type BinaryAuthorization struct { // unspecified, defaults to DISABLED. // // Possible values: - // "EVALUATION_MODE_UNSPECIFIED" - Default value, equivalent to - // DISABLED. + // "EVALUATION_MODE_UNSPECIFIED" - Default value // "DISABLED" - Disable BinaryAuthorization - // "PROJECT_SINGLETON_POLICY_ENFORCE" - If enabled, enforce Kubernetes - // admission requests with BinAuthz using the project's singleton - // policy. Equivalent to bool enabled=true. + // "PROJECT_SINGLETON_POLICY_ENFORCE" - Enforce Kubernetes admission + // requests with BinaryAuthorization using the project's singleton + // policy. This is equivalent to setting the enabled boolean to true. EvaluationMode string `json:"evaluationMode,omitempty"` // ForceSendFields is a list of field names (e.g. "Enabled") to @@ -923,6 +922,10 @@ type Cluster struct { // in the cluster will be Confidential VM once enabled. ConfidentialNodes *ConfidentialNodes `json:"confidentialNodes,omitempty"` + // CostManagementConfig: Configuration for the fine-grained cost + // management feature. + CostManagementConfig *CostManagementConfig `json:"costManagementConfig,omitempty"` + // CreateTime: [Output only] The time the cluster was created, in // RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) text format. CreateTime string `json:"createTime,omitempty"` @@ -1394,6 +1397,10 @@ type ClusterUpdate struct { // cluster. DesiredClusterTelemetry *ClusterTelemetry `json:"desiredClusterTelemetry,omitempty"` + // DesiredCostManagementConfig: The desired configuration for the + // fine-grained cost management feature. + DesiredCostManagementConfig *CostManagementConfig `json:"desiredCostManagementConfig,omitempty"` + // DesiredDatabaseEncryption: Configuration of etcd encryption. DesiredDatabaseEncryption *DatabaseEncryption `json:"desiredDatabaseEncryption,omitempty"` @@ -1744,6 +1751,35 @@ func (s *ConsumptionMeteringConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CostManagementConfig: Configuration for fine-grained cost management +// feature. +type CostManagementConfig struct { + // Enabled: Whether the feature is enabled or not. + Enabled bool `json:"enabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CostManagementConfig) MarshalJSON() ([]byte, error) { + type NoMethod CostManagementConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreateClusterRequest: CreateClusterRequest creates a cluster. type CreateClusterRequest struct { // Cluster: Required. A cluster resource diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 06e795aa07a..e7c5ec36c15 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -5950,7 +5950,7 @@ } } }, - "revision": "20220602", + "revision": "20220623", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -9499,12 +9499,12 @@ "id": "Metrics", "properties": { "aos": { - "description": "Average order size - the average number of items in an order. **This metric cannot be segmented by product dimensions.**", + "description": "Average order size - the average number of items in an order. **This metric cannot be segmented by product dimensions and customer_country_code.**", "format": "double", "type": "number" }, "aovMicros": { - "description": "Average order value - the average value (total price of items) of all placed orders. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by product dimensions.**", + "description": "Average order value - the average value (total price of items) of all placed orders. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by product dimensions and customer_country_code.**", "format": "double", "type": "number" }, @@ -9534,7 +9534,7 @@ "type": "number" }, "daysToShip": { - "description": "Average number of days between an order being placed and the order being fully shipped, reported on the last shipment date. **This metric cannot be segmented by product dimensions.**", + "description": "Average number of days between an order being placed and the order being fully shipped, reported on the last shipment date. **This metric cannot be segmented by product dimensions and customer_country_code.**", "format": "double", "type": "number" }, @@ -9544,72 +9544,72 @@ "type": "string" }, "itemDaysToShip": { - "description": "Average number of days between an item being ordered and the item being", + "description": "Average number of days between an item being ordered and the item being **This metric cannot be segmented by customer_country_code.**", "format": "double", "type": "number" }, "itemFillRate": { - "description": "Percentage of shipped items in relation to all finalized items (shipped or rejected by the merchant; unshipped items are not taken into account), reported on the order date. Item fill rate is lowered by merchant rejections.", + "description": "Percentage of shipped items in relation to all finalized items (shipped or rejected by the merchant; unshipped items are not taken into account), reported on the order date. Item fill rate is lowered by merchant rejections. **This metric cannot be segmented by customer_country_code.**", "format": "double", "type": "number" }, "orderedItemSalesMicros": { - "description": "Total price of ordered items. Excludes shipping, taxes (US only), and customer cancellations that happened within 30 minutes of placing the order. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response.", + "description": "Total price of ordered items. Excludes shipping, taxes (US only), and customer cancellations that happened within 30 minutes of placing the order. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", "format": "int64", "type": "string" }, "orderedItems": { - "description": "Number of ordered items. Excludes customer cancellations that happened within 30 minutes of placing the order.", + "description": "Number of ordered items. Excludes customer cancellations that happened within 30 minutes of placing the order. **This metric cannot be segmented by customer_country_code.**", "format": "int64", "type": "string" }, "orders": { - "description": "Number of placed orders. Excludes customer cancellations that happened within 30 minutes of placing the order. **This metric cannot be segmented by product dimensions.**", + "description": "Number of placed orders. Excludes customer cancellations that happened within 30 minutes of placing the order. **This metric cannot be segmented by product dimensions and customer_country_code.**", "format": "int64", "type": "string" }, "rejectedItems": { - "description": "Number of ordered items canceled by the merchant, reported on the order date.", + "description": "Number of ordered items canceled by the merchant, reported on the order date. **This metric cannot be segmented by customer_country_code.**", "format": "int64", "type": "string" }, "returnRate": { - "description": "Total price of returned items divided by the total price of shipped items, reported on the order date. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response.", + "description": "Total price of returned items divided by the total price of shipped items, reported on the order date. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", "format": "double", "type": "number" }, "returnedItems": { - "description": "Number of ordered items sent back for return, reported on the date when the merchant accepted the return.", + "description": "Number of ordered items sent back for return, reported on the date when the merchant accepted the return. **This metric cannot be segmented by customer_country_code.**", "format": "int64", "type": "string" }, "returnsMicros": { - "description": "Total price of ordered items sent back for return, reported on the date when the merchant accepted the return. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response.", + "description": "Total price of ordered items sent back for return, reported on the date when the merchant accepted the return. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", "format": "int64", "type": "string" }, "shippedItemSalesMicros": { - "description": "Total price of shipped items, reported on the order date. Excludes shipping and taxes (US only). The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response.", + "description": "Total price of shipped items, reported on the order date. Excludes shipping and taxes (US only). The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", "format": "int64", "type": "string" }, "shippedItems": { - "description": "Number of shipped items, reported on the shipment date.", + "description": "Number of shipped items, reported on the shipment date. **This metric cannot be segmented by customer_country_code.**", "format": "int64", "type": "string" }, "shippedOrders": { - "description": "Number of fully shipped orders, reported on the last shipment date. **This metric cannot be segmented by product dimensions.**", + "description": "Number of fully shipped orders, reported on the last shipment date. **This metric cannot be segmented by product dimensions and customer_country_code.**", "format": "int64", "type": "string" }, "unshippedItems": { - "description": "Number of ordered items not shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped items over the days in the queried period.", + "description": "Number of ordered items not shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped items over the days in the queried period. **This metric cannot be segmented by customer_country_code.**", "format": "double", "type": "number" }, "unshippedOrders": { - "description": "Number of orders not shipped or partially shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped orders over the days in the queried period. **This metric cannot be segmented by product dimensions.**", + "description": "Number of orders not shipped or partially shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped orders over the days in the queried period. **This metric cannot be segmented by product dimensions and customer_country_code.**", "format": "double", "type": "number" } @@ -13539,7 +13539,7 @@ "type": "object" }, "Promotion": { - "description": "The Promotions feature is available for `AU`, `CA`, `DE`, `FR`, `GB`, `IN` and `US` target countries, and `en` content language. Represents a promotion. See the following articles for more details. * [Promotions feed specification](https://support.google.com/merchants/answer/2906014) * [Local promotions feed specification](https://support.google.com/merchants/answer/10146130) * [Promotions on Buy on Google product data specification](https://support.google.com/merchants/answer/9173673)", + "description": "Represents a promotion. See the following articles for more details. * [Promotions feed specification](https://support.google.com/merchants/answer/2906014) * [Local promotions feed specification](https://support.google.com/merchants/answer/10146130) * [Promotions on Buy on Google product data specification](https://support.google.com/merchants/answer/9173673)", "id": "Promotion", "properties": { "brand": { @@ -13557,7 +13557,7 @@ "type": "array" }, "contentLanguage": { - "description": "Required. The content language used as part of the unique identifier. Currently only `en` value is supported.", + "description": "Required. The content language used as part of the unique identifier. `en` content language is available for all target countries. `fr` content language is available for `CA` and `FR` target countries, and `de` content language is available for `DE` target country.", "type": "string" }, "couponValueType": { @@ -15266,6 +15266,10 @@ "description": "Custom label 4 for custom grouping of products.", "type": "string" }, + "customerCountryCode": { + "description": "Code of the country where the customer is located at the time of the event. Represented in the ISO 3166 format. If the customer country cannot be determined, a special 'ZZ' code is returned.", + "type": "string" + }, "date": { "$ref": "Date", "description": "Date in the merchant timezone to which metrics apply." diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 2851cbc267f..0a4dc05d67c 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -6699,7 +6699,8 @@ func (s *MerchantRejectionReason) MarshalJSON() ([]byte, error) { // requested explicitly in the request's search query. type Metrics struct { // Aos: Average order size - the average number of items in an order. - // **This metric cannot be segmented by product dimensions.** + // **This metric cannot be segmented by product dimensions and + // customer_country_code.** Aos float64 `json:"aos,omitempty"` // AovMicros: Average order value - the average value (total price of @@ -6708,7 +6709,8 @@ type Metrics struct { // 'segments.currency_code' is automatically added to the SELECT clause // in the search query (unless it is explicitly selected by the user) // and the currency_code segment is populated in the response. **This - // metric cannot be segmented by product dimensions.** + // metric cannot be segmented by product dimensions and + // customer_country_code.** AovMicros float64 `json:"aovMicros,omitempty"` // Clicks: Number of clicks. @@ -6744,20 +6746,23 @@ type Metrics struct { // DaysToShip: Average number of days between an order being placed and // the order being fully shipped, reported on the last shipment date. - // **This metric cannot be segmented by product dimensions.** + // **This metric cannot be segmented by product dimensions and + // customer_country_code.** DaysToShip float64 `json:"daysToShip,omitempty"` // Impressions: Number of times merchant's products are shown. Impressions int64 `json:"impressions,omitempty,string"` // ItemDaysToShip: Average number of days between an item being ordered - // and the item being + // and the item being **This metric cannot be segmented by + // customer_country_code.** ItemDaysToShip float64 `json:"itemDaysToShip,omitempty"` // ItemFillRate: Percentage of shipped items in relation to all // finalized items (shipped or rejected by the merchant; unshipped items // are not taken into account), reported on the order date. Item fill - // rate is lowered by merchant rejections. + // rate is lowered by merchant rejections. **This metric cannot be + // segmented by customer_country_code.** ItemFillRate float64 `json:"itemFillRate,omitempty"` // OrderedItemSalesMicros: Total price of ordered items. Excludes @@ -6767,20 +6772,23 @@ type Metrics struct { // selected, 'segments.currency_code' is automatically added to the // SELECT clause in the search query (unless it is explicitly selected // by the user) and the currency_code segment is populated in the - // response. + // response. **This metric cannot be segmented by + // customer_country_code.** OrderedItemSalesMicros int64 `json:"orderedItemSalesMicros,omitempty,string"` // OrderedItems: Number of ordered items. Excludes customer // cancellations that happened within 30 minutes of placing the order. + // **This metric cannot be segmented by customer_country_code.** OrderedItems int64 `json:"orderedItems,omitempty,string"` // Orders: Number of placed orders. Excludes customer cancellations that // happened within 30 minutes of placing the order. **This metric cannot - // be segmented by product dimensions.** + // be segmented by product dimensions and customer_country_code.** Orders int64 `json:"orders,omitempty,string"` // RejectedItems: Number of ordered items canceled by the merchant, - // reported on the order date. + // reported on the order date. **This metric cannot be segmented by + // customer_country_code.** RejectedItems int64 `json:"rejectedItems,omitempty,string"` // ReturnRate: Total price of returned items divided by the total price @@ -6788,11 +6796,13 @@ type Metrics struct { // selected, 'segments.currency_code' is automatically added to the // SELECT clause in the search query (unless it is explicitly selected // by the user) and the currency_code segment is populated in the - // response. + // response. **This metric cannot be segmented by + // customer_country_code.** ReturnRate float64 `json:"returnRate,omitempty"` // ReturnedItems: Number of ordered items sent back for return, reported - // on the date when the merchant accepted the return. + // on the date when the merchant accepted the return. **This metric + // cannot be segmented by customer_country_code.** ReturnedItems int64 `json:"returnedItems,omitempty,string"` // ReturnsMicros: Total price of ordered items sent back for return, @@ -6801,7 +6811,8 @@ type Metrics struct { // segment. If this metric is selected, 'segments.currency_code' is // automatically added to the SELECT clause in the search query (unless // it is explicitly selected by the user) and the currency_code segment - // is populated in the response. + // is populated in the response. **This metric cannot be segmented by + // customer_country_code.** ReturnsMicros int64 `json:"returnsMicros,omitempty,string"` // ShippedItemSalesMicros: Total price of shipped items, reported on the @@ -6810,28 +6821,32 @@ type Metrics struct { // metric is selected, 'segments.currency_code' is automatically added // to the SELECT clause in the search query (unless it is explicitly // selected by the user) and the currency_code segment is populated in - // the response. + // the response. **This metric cannot be segmented by + // customer_country_code.** ShippedItemSalesMicros int64 `json:"shippedItemSalesMicros,omitempty,string"` // ShippedItems: Number of shipped items, reported on the shipment date. + // **This metric cannot be segmented by customer_country_code.** ShippedItems int64 `json:"shippedItems,omitempty,string"` // ShippedOrders: Number of fully shipped orders, reported on the last // shipment date. **This metric cannot be segmented by product - // dimensions.** + // dimensions and customer_country_code.** ShippedOrders int64 `json:"shippedOrders,omitempty,string"` // UnshippedItems: Number of ordered items not shipped up until the end // of the queried day. If a multi-day period is specified in the search // query, the returned value is the average number of unshipped items - // over the days in the queried period. + // over the days in the queried period. **This metric cannot be + // segmented by customer_country_code.** UnshippedItems float64 `json:"unshippedItems,omitempty"` // UnshippedOrders: Number of orders not shipped or partially shipped up // until the end of the queried day. If a multi-day period is specified // in the search query, the returned value is the average number of // unshipped orders over the days in the queried period. **This metric - // cannot be segmented by product dimensions.** + // cannot be segmented by product dimensions and + // customer_country_code.** UnshippedOrders float64 `json:"unshippedOrders,omitempty"` // ForceSendFields is a list of field names (e.g. "Aos") to @@ -13532,10 +13547,8 @@ func (s *ProductstatusesListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Promotion: The Promotions feature is available for `AU`, `CA`, `DE`, -// `FR`, `GB`, `IN` and `US` target countries, and `en` content -// language. Represents a promotion. See the following articles for more -// details. * Promotions feed specification +// Promotion: Represents a promotion. See the following articles for +// more details. * Promotions feed specification // (https://support.google.com/merchants/answer/2906014) * Local // promotions feed specification // (https://support.google.com/merchants/answer/10146130) * Promotions @@ -13549,7 +13562,10 @@ type Promotion struct { BrandExclusion []string `json:"brandExclusion,omitempty"` // ContentLanguage: Required. The content language used as part of the - // unique identifier. Currently only `en` value is supported. + // unique identifier. `en` content language is available for all target + // countries. `fr` content language is available for `CA` and `FR` + // target countries, and `de` content language is available for `DE` + // target country. ContentLanguage string `json:"contentLanguage,omitempty"` // CouponValueType: Required. Coupon value type for the promotion. @@ -16246,6 +16262,12 @@ type Segments struct { // CustomLabel4: Custom label 4 for custom grouping of products. CustomLabel4 string `json:"customLabel4,omitempty"` + // CustomerCountryCode: Code of the country where the customer is + // located at the time of the event. Represented in the ISO 3166 format. + // If the customer country cannot be determined, a special 'ZZ' code is + // returned. + CustomerCountryCode string `json:"customerCountryCode,omitempty"` + // Date: Date in the merchant timezone to which metrics apply. Date *Date `json:"date,omitempty"` diff --git a/firebase/v1beta1/firebase-api.json b/firebase/v1beta1/firebase-api.json index d585887c297..7c4f37b787d 100644 --- a/firebase/v1beta1/firebase-api.json +++ b/firebase/v1beta1/firebase-api.json @@ -449,6 +449,11 @@ "pattern": "^projects/[^/]+$", "required": true, "type": "string" + }, + "showDeleted": { + "description": "Controls whether Apps in the DELETED state should be returned. Defaults to false.", + "location": "query", + "type": "boolean" } }, "path": "v1beta1/{+parent}:searchApps", @@ -577,6 +582,11 @@ "pattern": "^projects/[^/]+$", "required": true, "type": "string" + }, + "showDeleted": { + "description": "Controls whether Apps in the DELETED state should be returned. Defaults to false.", + "location": "query", + "type": "boolean" } }, "path": "v1beta1/{+parent}/androidApps", @@ -607,7 +617,7 @@ "type": "string" }, "updateMask": { - "description": "Specifies which fields to update. Note that the fields `name`, `app_id`, `project_id`, and `package_name` are all immutable.", + "description": "Specifies which fields to update. Note that the fields `name`, `app_id`, `project_id`, `package_name`, and `state` are all immutable.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -905,6 +915,11 @@ "pattern": "^projects/[^/]+$", "required": true, "type": "string" + }, + "showDeleted": { + "description": "Controls whether Apps in the DELETED state should be returned. Defaults to false.", + "location": "query", + "type": "boolean" } }, "path": "v1beta1/{+parent}/iosApps", @@ -935,7 +950,7 @@ "type": "string" }, "updateMask": { - "description": "Specifies which fields to update. Note that the fields `name`, `appId`, `projectId`, and `bundleId` are all immutable.", + "description": "Specifies which fields to update. Note that the fields `name`, `appId`, `projectId`, `bundleId`, and `state` are all immutable", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1068,6 +1083,11 @@ "pattern": "^projects/[^/]+$", "required": true, "type": "string" + }, + "showDeleted": { + "description": "Controls whether Apps in the DELETED state should be returned. Defaults to false.", + "location": "query", + "type": "boolean" } }, "path": "v1beta1/{+parent}/webApps", @@ -1098,7 +1118,7 @@ "type": "string" }, "updateMask": { - "description": "Specifies which fields to update. Note that the fields `name`, `appId`, and `projectId` are all immutable.", + "description": "Specifies which fields to update. Note that the fields `name`, `appId`, `projectId` and `state` are all immutable", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1121,7 +1141,7 @@ } } }, - "revision": "20220621", + "revision": "20220624", "rootUrl": "https://firebase.googleapis.com/", "schemas": { "AddFirebaseRequest": { @@ -1237,6 +1257,21 @@ "description": "Output only. Immutable. A user-assigned unique identifier of the parent FirebaseProject for the `AndroidApp`.", "readOnly": true, "type": "string" + }, + "state": { + "description": "Output only. The lifecycle state of the App.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "DELETED" + ], + "enumDescriptions": [ + "Unspecified state.", + "The normal and active state.", + "The app has been soft deleted." + ], + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1333,6 +1368,21 @@ "The Firebase App is associated with web." ], "type": "string" + }, + "state": { + "description": "Output only. The lifecycle state of the App.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "DELETED" + ], + "enumDescriptions": [ + "Unspecified state.", + "The normal and active state.", + "The app has been soft deleted." + ], + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1414,6 +1464,21 @@ "readOnly": true, "type": "string" }, + "state": { + "description": "Output only. The lifecycle state of the App.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "DELETED" + ], + "enumDescriptions": [ + "Unspecified state.", + "The normal and active state.", + "The app has been soft deleted." + ], + "readOnly": true, + "type": "string" + }, "teamId": { "description": "The Apple Developer Team ID associated with the App in the App Store.", "type": "string" @@ -1821,6 +1886,21 @@ "readOnly": true, "type": "string" }, + "state": { + "description": "Output only. The lifecycle state of the App.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "DELETED" + ], + "enumDescriptions": [ + "Unspecified state.", + "The normal and active state.", + "The app has been soft deleted." + ], + "readOnly": true, + "type": "string" + }, "webId": { "description": "Output only. Immutable. A unique, Firebase-assigned identifier for the `WebApp`. This identifier is only used to populate the `namespace` value for the `WebApp`. For most use cases, use `appId` to identify or reference the App. The `webId` value is only unique within a `FirebaseProject` and its associated Apps.", "readOnly": true, diff --git a/firebase/v1beta1/firebase-gen.go b/firebase/v1beta1/firebase-gen.go index c12c7720684..d8f58f7f9a4 100644 --- a/firebase/v1beta1/firebase-gen.go +++ b/firebase/v1beta1/firebase-gen.go @@ -504,6 +504,14 @@ type AndroidApp struct { // of the parent FirebaseProject for the `AndroidApp`. ProjectId string `json:"projectId,omitempty"` + // State: Output only. The lifecycle state of the App. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "ACTIVE" - The normal and active state. + // "DELETED" - The app has been soft deleted. + State string `json:"state,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -708,6 +716,14 @@ type FirebaseAppInfo struct { // "WEB" - The Firebase App is associated with web. Platform string `json:"platform,omitempty"` + // State: Output only. The lifecycle state of the App. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "ACTIVE" - The normal and active state. + // "DELETED" - The app has been soft deleted. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "AppId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -853,6 +869,14 @@ type IosApp struct { // of the parent FirebaseProject for the `IosApp`. ProjectId string `json:"projectId,omitempty"` + // State: Output only. The lifecycle state of the App. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "ACTIVE" - The normal and active state. + // "DELETED" - The app has been soft deleted. + State string `json:"state,omitempty"` + // TeamId: The Apple Developer Team ID associated with the App in the // App Store. TeamId string `json:"teamId,omitempty"` @@ -1673,6 +1697,14 @@ type WebApp struct { // of the parent FirebaseProject for the `WebApp`. ProjectId string `json:"projectId,omitempty"` + // State: Output only. The lifecycle state of the App. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "ACTIVE" - The normal and active state. + // "DELETED" - The app has been soft deleted. + State string `json:"state,omitempty"` + // WebId: Output only. Immutable. A unique, Firebase-assigned identifier // for the `WebApp`. This identifier is only used to populate the // `namespace` value for the `WebApp`. For most use cases, use `appId` @@ -3540,6 +3572,14 @@ func (c *ProjectsSearchAppsCall) PageToken(pageToken string) *ProjectsSearchApps return c } +// ShowDeleted sets the optional parameter "showDeleted": Controls +// whether Apps in the DELETED state should be returned. Defaults to +// false. +func (c *ProjectsSearchAppsCall) ShowDeleted(showDeleted bool) *ProjectsSearchAppsCall { + c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -3669,6 +3709,11 @@ func (c *ProjectsSearchAppsCall) Do(opts ...googleapi.CallOption) (*SearchFireba // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" + // }, + // "showDeleted": { + // "description": "Controls whether Apps in the DELETED state should be returned. Defaults to false.", + // "location": "query", + // "type": "boolean" // } // }, // "path": "v1beta1/{+parent}:searchApps", @@ -4213,6 +4258,14 @@ func (c *ProjectsAndroidAppsListCall) PageToken(pageToken string) *ProjectsAndro return c } +// ShowDeleted sets the optional parameter "showDeleted": Controls +// whether Apps in the DELETED state should be returned. Defaults to +// false. +func (c *ProjectsAndroidAppsListCall) ShowDeleted(showDeleted bool) *ProjectsAndroidAppsListCall { + c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -4337,6 +4390,11 @@ func (c *ProjectsAndroidAppsListCall) Do(opts ...googleapi.CallOption) (*ListAnd // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" + // }, + // "showDeleted": { + // "description": "Controls whether Apps in the DELETED state should be returned. Defaults to false.", + // "location": "query", + // "type": "boolean" // } // }, // "path": "v1beta1/{+parent}/androidApps", @@ -4408,7 +4466,7 @@ func (r *ProjectsAndroidAppsService) Patch(nameid string, androidapp *AndroidApp // UpdateMask sets the optional parameter "updateMask": Specifies which // fields to update. Note that the fields `name`, `app_id`, -// `project_id`, and `package_name` are all immutable. +// `project_id`, `package_name`, and `state` are all immutable. func (c *ProjectsAndroidAppsPatchCall) UpdateMask(updateMask string) *ProjectsAndroidAppsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -4521,7 +4579,7 @@ func (c *ProjectsAndroidAppsPatchCall) Do(opts ...googleapi.CallOption) (*Androi // "type": "string" // }, // "updateMask": { - // "description": "Specifies which fields to update. Note that the fields `name`, `app_id`, `project_id`, and `package_name` are all immutable.", + // "description": "Specifies which fields to update. Note that the fields `name`, `app_id`, `project_id`, `package_name`, and `state` are all immutable.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -5894,6 +5952,14 @@ func (c *ProjectsIosAppsListCall) PageToken(pageToken string) *ProjectsIosAppsLi return c } +// ShowDeleted sets the optional parameter "showDeleted": Controls +// whether Apps in the DELETED state should be returned. Defaults to +// false. +func (c *ProjectsIosAppsListCall) ShowDeleted(showDeleted bool) *ProjectsIosAppsListCall { + c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -6018,6 +6084,11 @@ func (c *ProjectsIosAppsListCall) Do(opts ...googleapi.CallOption) (*ListIosApps // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" + // }, + // "showDeleted": { + // "description": "Controls whether Apps in the DELETED state should be returned. Defaults to false.", + // "location": "query", + // "type": "boolean" // } // }, // "path": "v1beta1/{+parent}/iosApps", @@ -6088,7 +6159,7 @@ func (r *ProjectsIosAppsService) Patch(nameid string, iosapp *IosApp) *ProjectsI // UpdateMask sets the optional parameter "updateMask": Specifies which // fields to update. Note that the fields `name`, `appId`, `projectId`, -// and `bundleId` are all immutable. +// `bundleId`, and `state` are all immutable func (c *ProjectsIosAppsPatchCall) UpdateMask(updateMask string) *ProjectsIosAppsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -6201,7 +6272,7 @@ func (c *ProjectsIosAppsPatchCall) Do(opts ...googleapi.CallOption) (*IosApp, er // "type": "string" // }, // "updateMask": { - // "description": "Specifies which fields to update. Note that the fields `name`, `appId`, `projectId`, and `bundleId` are all immutable.", + // "description": "Specifies which fields to update. Note that the fields `name`, `appId`, `projectId`, `bundleId`, and `state` are all immutable", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -6728,6 +6799,14 @@ func (c *ProjectsWebAppsListCall) PageToken(pageToken string) *ProjectsWebAppsLi return c } +// ShowDeleted sets the optional parameter "showDeleted": Controls +// whether Apps in the DELETED state should be returned. Defaults to +// false. +func (c *ProjectsWebAppsListCall) ShowDeleted(showDeleted bool) *ProjectsWebAppsListCall { + c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -6852,6 +6931,11 @@ func (c *ProjectsWebAppsListCall) Do(opts ...googleapi.CallOption) (*ListWebApps // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" + // }, + // "showDeleted": { + // "description": "Controls whether Apps in the DELETED state should be returned. Defaults to false.", + // "location": "query", + // "type": "boolean" // } // }, // "path": "v1beta1/{+parent}/webApps", @@ -6921,8 +7005,8 @@ func (r *ProjectsWebAppsService) Patch(nameid string, webapp *WebApp) *ProjectsW } // UpdateMask sets the optional parameter "updateMask": Specifies which -// fields to update. Note that the fields `name`, `appId`, and -// `projectId` are all immutable. +// fields to update. Note that the fields `name`, `appId`, `projectId` +// and `state` are all immutable func (c *ProjectsWebAppsPatchCall) UpdateMask(updateMask string) *ProjectsWebAppsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -7035,7 +7119,7 @@ func (c *ProjectsWebAppsPatchCall) Do(opts ...googleapi.CallOption) (*WebApp, er // "type": "string" // }, // "updateMask": { - // "description": "Specifies which fields to update. Note that the fields `name`, `appId`, and `projectId` are all immutable.", + // "description": "Specifies which fields to update. Note that the fields `name`, `appId`, `projectId` and `state` are all immutable", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index 8f08cc18b4a..3b5a0c9d990 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -1151,7 +1151,7 @@ } } }, - "revision": "20220613", + "revision": "20220621", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -3447,6 +3447,10 @@ "description": "Logs all denies and dry run failures.", "type": "boolean" }, + "monitoring": { + "$ref": "PolicyControllerMonitoringConfig", + "description": "Monitoring specifies the configuration of monitoring." + }, "mutationEnabled": { "description": "Enables the ability to mutate resources using Policy Controller.", "type": "boolean" @@ -3561,6 +3565,30 @@ }, "type": "object" }, + "PolicyControllerMonitoringConfig": { + "description": "MonitoringConfig specifies the backends Policy Controller should export metrics to. For example, to specify metrics should be exported to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\", \"prometheus\"]", + "id": "PolicyControllerMonitoringConfig", + "properties": { + "backends": { + "description": "Specifies the list of backends Policy Controller will export to. An empty list would effectively disable metrics export.", + "items": { + "enum": [ + "MONITORING_BACKEND_UNSPECIFIED", + "PROMETHEUS", + "CLOUD_MONITORING" + ], + "enumDescriptions": [ + "Backend cannot be determined", + "Prometheus backend for monitoring", + "Stackdriver/Cloud Monitoring backend for monitoring" + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "PolicyControllerTemplateLibraryConfig": { "description": "The config specifying which default library templates to install.", "id": "PolicyControllerTemplateLibraryConfig", diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index ce856223fdd..bb2d479d2e5 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -3993,6 +3993,9 @@ type PolicyControllerHubConfig struct { // LogDeniesEnabled: Logs all denies and dry run failures. LogDeniesEnabled bool `json:"logDeniesEnabled,omitempty"` + // Monitoring: Monitoring specifies the configuration of monitoring. + Monitoring *PolicyControllerMonitoringConfig `json:"monitoring,omitempty"` + // MutationEnabled: Enables the ability to mutate resources using Policy // Controller. MutationEnabled bool `json:"mutationEnabled,omitempty"` @@ -4211,6 +4214,44 @@ func (s *PolicyControllerMembershipState) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PolicyControllerMonitoringConfig: MonitoringConfig specifies the +// backends Policy Controller should export metrics to. For example, to +// specify metrics should be exported to Cloud Monitoring and +// Prometheus, specify backends: ["cloudmonitoring", "prometheus"] +type PolicyControllerMonitoringConfig struct { + // Backends: Specifies the list of backends Policy Controller will + // export to. An empty list would effectively disable metrics export. + // + // Possible values: + // "MONITORING_BACKEND_UNSPECIFIED" - Backend cannot be determined + // "PROMETHEUS" - Prometheus backend for monitoring + // "CLOUD_MONITORING" - Stackdriver/Cloud Monitoring backend for + // monitoring + Backends []string `json:"backends,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Backends") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Backends") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PolicyControllerMonitoringConfig) MarshalJSON() ([]byte, error) { + type NoMethod PolicyControllerMonitoringConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PolicyControllerTemplateLibraryConfig: The config specifying which // default library templates to install. type PolicyControllerTemplateLibraryConfig struct { diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index 7e3e87823d1..942133d92a6 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -670,7 +670,7 @@ } } }, - "revision": "20220530", + "revision": "20220621", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2402,6 +2402,10 @@ "description": "Logs all denies and dry run failures.", "type": "boolean" }, + "monitoring": { + "$ref": "PolicyControllerMonitoringConfig", + "description": "Monitoring specifies the configuration of monitoring." + }, "referentialRulesEnabled": { "description": "Enables the ability to use Constraint Templates that reference to objects other than the object currently being evaluated.", "type": "boolean" @@ -2512,6 +2516,30 @@ }, "type": "object" }, + "PolicyControllerMonitoringConfig": { + "description": "MonitoringConfig specifies the backends Policy Controller should export metrics to. For example, to specify metrics should be exported to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\", \"prometheus\"]", + "id": "PolicyControllerMonitoringConfig", + "properties": { + "backends": { + "description": "Specifies the list of backends Policy Controller will export to. An empty list would effectively disable metrics export.", + "items": { + "enum": [ + "MONITORING_BACKEND_UNSPECIFIED", + "PROMETHEUS", + "CLOUD_MONITORING" + ], + "enumDescriptions": [ + "Backend cannot be determined", + "Prometheus backend for monitoring", + "Stackdriver/Cloud Monitoring backend for monitoring" + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "PolicyControllerTemplateLibraryConfig": { "description": "The config specifying which default library templates to install.", "id": "PolicyControllerTemplateLibraryConfig", diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index ac1fa10b1b7..8607fbd0606 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -2994,6 +2994,9 @@ type PolicyControllerHubConfig struct { // LogDeniesEnabled: Logs all denies and dry run failures. LogDeniesEnabled bool `json:"logDeniesEnabled,omitempty"` + // Monitoring: Monitoring specifies the configuration of monitoring. + Monitoring *PolicyControllerMonitoringConfig `json:"monitoring,omitempty"` + // ReferentialRulesEnabled: Enables the ability to use Constraint // Templates that reference to objects other than the object currently // being evaluated. @@ -3208,6 +3211,44 @@ func (s *PolicyControllerMembershipState) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PolicyControllerMonitoringConfig: MonitoringConfig specifies the +// backends Policy Controller should export metrics to. For example, to +// specify metrics should be exported to Cloud Monitoring and +// Prometheus, specify backends: ["cloudmonitoring", "prometheus"] +type PolicyControllerMonitoringConfig struct { + // Backends: Specifies the list of backends Policy Controller will + // export to. An empty list would effectively disable metrics export. + // + // Possible values: + // "MONITORING_BACKEND_UNSPECIFIED" - Backend cannot be determined + // "PROMETHEUS" - Prometheus backend for monitoring + // "CLOUD_MONITORING" - Stackdriver/Cloud Monitoring backend for + // monitoring + Backends []string `json:"backends,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Backends") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Backends") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PolicyControllerMonitoringConfig) MarshalJSON() ([]byte, error) { + type NoMethod PolicyControllerMonitoringConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PolicyControllerTemplateLibraryConfig: The config specifying which // default library templates to install. type PolicyControllerTemplateLibraryConfig struct { diff --git a/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-api.json b/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-api.json index 6fa8649145e..0ac21b0f9c0 100644 --- a/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-api.json +++ b/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-api.json @@ -530,7 +530,7 @@ } } }, - "revision": "20220322", + "revision": "20220625", "rootUrl": "https://mybusinessaccountmanagement.googleapis.com/", "schemas": { "AcceptInvitationRequest": { @@ -840,7 +840,7 @@ "type": "object" }, "PostalAddress": { - "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an i18n-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", + "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", "id": "PostalAddress", "properties": { "addressLines": { diff --git a/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go b/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go index f0b113b90d6..8bf35bff840 100644 --- a/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go +++ b/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go @@ -622,9 +622,9 @@ func (s *OrganizationInfo) MarshalJSON() ([]byte, error) { // to model geographical locations (roads, towns, mountains). In typical // usage an address would be created via user input or from importing // existing data, depending on the type of process. Advice on address -// input / editing: - Use an i18n-ready address widget such as -// https://github.com/google/libaddressinput) - Users should not be -// presented with UI elements for input or editing of fields outside +// input / editing: - Use an internationalization-ready address widget +// such as https://github.com/google/libaddressinput) - Users should not +// be presented with UI elements for input or editing of fields outside // countries where that field is used. For more guidance on how to use // this schema, please see: // https://support.google.com/business/answer/6397478 diff --git a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json index 9dd6b5b3511..2f2070e0c91 100644 --- a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json +++ b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json @@ -662,7 +662,7 @@ } } }, - "revision": "20220322", + "revision": "20220625", "rootUrl": "https://mybusinessbusinessinformation.googleapis.com/", "schemas": { "AdWordsLocationExtensions": { @@ -1453,7 +1453,7 @@ "type": "object" }, "PostalAddress": { - "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an i18n-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", + "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", "id": "PostalAddress", "properties": { "addressLines": { diff --git a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go index f9317ee359b..8adac50f96b 100644 --- a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go +++ b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go @@ -1633,9 +1633,9 @@ func (s *Places) MarshalJSON() ([]byte, error) { // to model geographical locations (roads, towns, mountains). In typical // usage an address would be created via user input or from importing // existing data, depending on the type of process. Advice on address -// input / editing: - Use an i18n-ready address widget such as -// https://github.com/google/libaddressinput) - Users should not be -// presented with UI elements for input or editing of fields outside +// input / editing: - Use an internationalization-ready address widget +// such as https://github.com/google/libaddressinput) - Users should not +// be presented with UI elements for input or editing of fields outside // countries where that field is used. For more guidance on how to use // this schema, please see: // https://support.google.com/business/answer/6397478 diff --git a/mybusinessverifications/v1/mybusinessverifications-api.json b/mybusinessverifications/v1/mybusinessverifications-api.json index e72f0acdedc..37af0d00a55 100644 --- a/mybusinessverifications/v1/mybusinessverifications-api.json +++ b/mybusinessverifications/v1/mybusinessverifications-api.json @@ -256,7 +256,7 @@ } } }, - "revision": "20220420", + "revision": "20220625", "rootUrl": "https://mybusinessverifications.googleapis.com/", "schemas": { "AddressVerificationData": { @@ -438,7 +438,7 @@ "type": "object" }, "PostalAddress": { - "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an i18n-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", + "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", "id": "PostalAddress", "properties": { "addressLines": { diff --git a/mybusinessverifications/v1/mybusinessverifications-gen.go b/mybusinessverifications/v1/mybusinessverifications-gen.go index 1ebd009acc3..37f68fcd8cc 100644 --- a/mybusinessverifications/v1/mybusinessverifications-gen.go +++ b/mybusinessverifications/v1/mybusinessverifications-gen.go @@ -576,9 +576,9 @@ func (s *Location) MarshalJSON() ([]byte, error) { // to model geographical locations (roads, towns, mountains). In typical // usage an address would be created via user input or from importing // existing data, depending on the type of process. Advice on address -// input / editing: - Use an i18n-ready address widget such as -// https://github.com/google/libaddressinput) - Users should not be -// presented with UI elements for input or editing of fields outside +// input / editing: - Use an internationalization-ready address widget +// such as https://github.com/google/libaddressinput) - Users should not +// be presented with UI elements for input or editing of fields outside // countries where that field is used. For more guidance on how to use // this schema, please see: // https://support.google.com/business/answer/6397478 diff --git a/recaptchaenterprise/v1/recaptchaenterprise-api.json b/recaptchaenterprise/v1/recaptchaenterprise-api.json index 52e05c0eb96..5c21128d6d4 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-api.json +++ b/recaptchaenterprise/v1/recaptchaenterprise-api.json @@ -369,6 +369,31 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "retrieveLegacySecretKey": { + "description": "Returns the secret key related to the specified public key. You should use the legacy secret key only if you are integrating with a 3rd party using the legacy reCAPTCHA instead of reCAPTCHA Enterprise.", + "flatPath": "v1/projects/{projectsId}/keys/{keysId}:retrieveLegacySecretKey", + "httpMethod": "GET", + "id": "recaptchaenterprise.projects.keys.retrieveLegacySecretKey", + "parameterOrder": [ + "key" + ], + "parameters": { + "key": { + "description": "Required. The public key name linked to the requested secret key , in the format \"projects/{project}/keys/{key}\".", + "location": "path", + "pattern": "^projects/[^/]+/keys/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+key}:retrieveLegacySecretKey", + "response": { + "$ref": "GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -489,7 +514,7 @@ } } }, - "revision": "20220522", + "revision": "20220625", "rootUrl": "https://recaptchaenterprise.googleapis.com/", "schemas": { "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { @@ -912,6 +937,17 @@ }, "type": "object" }, + "GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse": { + "description": "Secret key used in legacy reCAPTCHA only. Should be used when integrating with a 3rd party which is still using legacy reCAPTCHA.", + "id": "GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse", + "properties": { + "legacySecretKey": { + "description": "The secret key (also known as shared secret) authorizes communication between your application backend and the reCAPTCHA Enterprise server to create an assessment. The secret key needs to be kept safe for security purposes.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRecaptchaenterpriseV1RiskAnalysis": { "description": "Risk analysis result for an event.", "id": "GoogleCloudRecaptchaenterpriseV1RiskAnalysis", diff --git a/recaptchaenterprise/v1/recaptchaenterprise-gen.go b/recaptchaenterprise/v1/recaptchaenterprise-gen.go index e08209a7445..878273ef738 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-gen.go +++ b/recaptchaenterprise/v1/recaptchaenterprise-gen.go @@ -913,6 +913,44 @@ func (s *GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership) MarshalJ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse: +// Secret key used in legacy reCAPTCHA only. Should be used when +// integrating with a 3rd party which is still using legacy reCAPTCHA. +type GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse struct { + // LegacySecretKey: The secret key (also known as shared secret) + // authorizes communication between your application backend and the + // reCAPTCHA Enterprise server to create an assessment. The secret key + // needs to be kept safe for security purposes. + LegacySecretKey string `json:"legacySecretKey,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "LegacySecretKey") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LegacySecretKey") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRecaptchaenterpriseV1RiskAnalysis: Risk analysis result // for an event. type GoogleCloudRecaptchaenterpriseV1RiskAnalysis struct { @@ -2737,6 +2775,159 @@ func (c *ProjectsKeysPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRe } +// method id "recaptchaenterprise.projects.keys.retrieveLegacySecretKey": + +type ProjectsKeysRetrieveLegacySecretKeyCall struct { + s *Service + key string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// RetrieveLegacySecretKey: Returns the secret key related to the +// specified public key. You should use the legacy secret key only if +// you are integrating with a 3rd party using the legacy reCAPTCHA +// instead of reCAPTCHA Enterprise. +// +// - key: The public key name linked to the requested secret key , in +// the format "projects/{project}/keys/{key}". +func (r *ProjectsKeysService) RetrieveLegacySecretKey(key string) *ProjectsKeysRetrieveLegacySecretKeyCall { + c := &ProjectsKeysRetrieveLegacySecretKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.key = key + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsKeysRetrieveLegacySecretKeyCall) Fields(s ...googleapi.Field) *ProjectsKeysRetrieveLegacySecretKeyCall { + 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 *ProjectsKeysRetrieveLegacySecretKeyCall) IfNoneMatch(entityTag string) *ProjectsKeysRetrieveLegacySecretKeyCall { + 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 *ProjectsKeysRetrieveLegacySecretKeyCall) Context(ctx context.Context) *ProjectsKeysRetrieveLegacySecretKeyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsKeysRetrieveLegacySecretKeyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsKeysRetrieveLegacySecretKeyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1/{+key}:retrieveLegacySecretKey") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "key": c.key, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "recaptchaenterprise.projects.keys.retrieveLegacySecretKey" call. +// Exactly one of +// *GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse.Serve +// rResponse.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 *ProjectsKeysRetrieveLegacySecretKeyCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse{ + ServerResponse: googleapi.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 secret key related to the specified public key. You should use the legacy secret key only if you are integrating with a 3rd party using the legacy reCAPTCHA instead of reCAPTCHA Enterprise.", + // "flatPath": "v1/projects/{projectsId}/keys/{keysId}:retrieveLegacySecretKey", + // "httpMethod": "GET", + // "id": "recaptchaenterprise.projects.keys.retrieveLegacySecretKey", + // "parameterOrder": [ + // "key" + // ], + // "parameters": { + // "key": { + // "description": "Required. The public key name linked to the requested secret key , in the format \"projects/{project}/keys/{key}\".", + // "location": "path", + // "pattern": "^projects/[^/]+/keys/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+key}:retrieveLegacySecretKey", + // "response": { + // "$ref": "GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "recaptchaenterprise.projects.relatedaccountgroupmemberships.search": type ProjectsRelatedaccountgroupmembershipsSearchCall struct { diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index b3d3f838785..222ef371198 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -182,6 +182,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getRapidVulnerabilityDetectionSettings": { + "description": "Get the RapidVulnerabilityDetectionSettings resource.", + "flatPath": "v1beta2/folders/{foldersId}/rapidVulnerabilityDetectionSettings", + "httpMethod": "GET", + "id": "securitycenter.folders.getRapidVulnerabilityDetectionSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the RapidVulnerabilityDetectionSettings to retrieve. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + "location": "path", + "pattern": "^folders/[^/]+/rapidVulnerabilityDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1beta2/{+name}", + "response": { + "$ref": "RapidVulnerabilityDetectionSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getSecurityCenterSettings": { "description": "Get the SecurityCenterSettings resource.", "flatPath": "v1beta2/folders/{foldersId}/securityCenterSettings", @@ -350,6 +375,40 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "updateRapidVulnerabilityDetectionSettings": { + "description": "Update the RapidVulnerabilityDetectionSettings resource.", + "flatPath": "v1beta2/folders/{foldersId}/rapidVulnerabilityDetectionSettings", + "httpMethod": "PATCH", + "id": "securitycenter.folders.updateRapidVulnerabilityDetectionSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name of the RapidVulnerabilityDetectionSettings. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + "location": "path", + "pattern": "^folders/[^/]+/rapidVulnerabilityDetectionSettings$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta2/{+name}", + "request": { + "$ref": "RapidVulnerabilityDetectionSettings" + }, + "response": { + "$ref": "RapidVulnerabilityDetectionSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "updateSecurityHealthAnalyticsSettings": { "description": "Update the SecurityHealthAnalyticsSettings resource.", "flatPath": "v1beta2/folders/{foldersId}/securityHealthAnalyticsSettings", @@ -512,6 +571,35 @@ } } }, + "rapidVulnerabilityDetectionSettings": { + "methods": { + "calculate": { + "description": "Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings.", + "flatPath": "v1beta2/folders/{foldersId}/rapidVulnerabilityDetectionSettings:calculate", + "httpMethod": "GET", + "id": "securitycenter.folders.rapidVulnerabilityDetectionSettings.calculate", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the RapidVulnerabilityDetectionSettings to calculate. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + "location": "path", + "pattern": "^folders/[^/]+/rapidVulnerabilityDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1beta2/{+name}:calculate", + "response": { + "$ref": "RapidVulnerabilityDetectionSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "securityHealthAnalyticsSettings": { "methods": { "calculate": { @@ -678,6 +766,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getRapidVulnerabilityDetectionSettings": { + "description": "Get the RapidVulnerabilityDetectionSettings resource.", + "flatPath": "v1beta2/organizations/{organizationsId}/rapidVulnerabilityDetectionSettings", + "httpMethod": "GET", + "id": "securitycenter.organizations.getRapidVulnerabilityDetectionSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the RapidVulnerabilityDetectionSettings to retrieve. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + "location": "path", + "pattern": "^organizations/[^/]+/rapidVulnerabilityDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1beta2/{+name}", + "response": { + "$ref": "RapidVulnerabilityDetectionSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getSecurityCenterSettings": { "description": "Get the SecurityCenterSettings resource.", "flatPath": "v1beta2/organizations/{organizationsId}/securityCenterSettings", @@ -871,6 +984,40 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "updateRapidVulnerabilityDetectionSettings": { + "description": "Update the RapidVulnerabilityDetectionSettings resource.", + "flatPath": "v1beta2/organizations/{organizationsId}/rapidVulnerabilityDetectionSettings", + "httpMethod": "PATCH", + "id": "securitycenter.organizations.updateRapidVulnerabilityDetectionSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name of the RapidVulnerabilityDetectionSettings. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + "location": "path", + "pattern": "^organizations/[^/]+/rapidVulnerabilityDetectionSettings$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta2/{+name}", + "request": { + "$ref": "RapidVulnerabilityDetectionSettings" + }, + "response": { + "$ref": "RapidVulnerabilityDetectionSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "updateSecurityHealthAnalyticsSettings": { "description": "Update the SecurityHealthAnalyticsSettings resource.", "flatPath": "v1beta2/organizations/{organizationsId}/securityHealthAnalyticsSettings", @@ -1033,6 +1180,35 @@ } } }, + "rapidVulnerabilityDetectionSettings": { + "methods": { + "calculate": { + "description": "Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings.", + "flatPath": "v1beta2/organizations/{organizationsId}/rapidVulnerabilityDetectionSettings:calculate", + "httpMethod": "GET", + "id": "securitycenter.organizations.rapidVulnerabilityDetectionSettings.calculate", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the RapidVulnerabilityDetectionSettings to calculate. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + "location": "path", + "pattern": "^organizations/[^/]+/rapidVulnerabilityDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1beta2/{+name}:calculate", + "response": { + "$ref": "RapidVulnerabilityDetectionSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "securityHealthAnalyticsSettings": { "methods": { "calculate": { @@ -1199,6 +1375,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getRapidVulnerabilityDetectionSettings": { + "description": "Get the RapidVulnerabilityDetectionSettings resource.", + "flatPath": "v1beta2/projects/{projectsId}/rapidVulnerabilityDetectionSettings", + "httpMethod": "GET", + "id": "securitycenter.projects.getRapidVulnerabilityDetectionSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the RapidVulnerabilityDetectionSettings to retrieve. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + "location": "path", + "pattern": "^projects/[^/]+/rapidVulnerabilityDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1beta2/{+name}", + "response": { + "$ref": "RapidVulnerabilityDetectionSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getSecurityCenterSettings": { "description": "Get the SecurityCenterSettings resource.", "flatPath": "v1beta2/projects/{projectsId}/securityCenterSettings", @@ -1367,6 +1568,40 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "updateRapidVulnerabilityDetectionSettings": { + "description": "Update the RapidVulnerabilityDetectionSettings resource.", + "flatPath": "v1beta2/projects/{projectsId}/rapidVulnerabilityDetectionSettings", + "httpMethod": "PATCH", + "id": "securitycenter.projects.updateRapidVulnerabilityDetectionSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The resource name of the RapidVulnerabilityDetectionSettings. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + "location": "path", + "pattern": "^projects/[^/]+/rapidVulnerabilityDetectionSettings$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta2/{+name}", + "request": { + "$ref": "RapidVulnerabilityDetectionSettings" + }, + "response": { + "$ref": "RapidVulnerabilityDetectionSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "updateSecurityHealthAnalyticsSettings": { "description": "Update the SecurityHealthAnalyticsSettings resource.", "flatPath": "v1beta2/projects/{projectsId}/securityHealthAnalyticsSettings", @@ -1627,6 +1862,35 @@ } } }, + "rapidVulnerabilityDetectionSettings": { + "methods": { + "calculate": { + "description": "Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings.", + "flatPath": "v1beta2/projects/{projectsId}/rapidVulnerabilityDetectionSettings:calculate", + "httpMethod": "GET", + "id": "securitycenter.projects.rapidVulnerabilityDetectionSettings.calculate", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the RapidVulnerabilityDetectionSettings to calculate. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + "location": "path", + "pattern": "^projects/[^/]+/rapidVulnerabilityDetectionSettings$", + "required": true, + "type": "string" + } + }, + "path": "v1beta2/{+name}:calculate", + "response": { + "$ref": "RapidVulnerabilityDetectionSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "securityHealthAnalyticsSettings": { "methods": { "calculate": { @@ -1717,7 +1981,7 @@ } } }, - "revision": "20220609", + "revision": "20220624", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -3345,6 +3609,46 @@ }, "type": "object" }, + "RapidVulnerabilityDetectionSettings": { + "description": "Resource capturing the settings for the Rapid Vulnerability Detection service.", + "id": "RapidVulnerabilityDetectionSettings", + "properties": { + "modules": { + "additionalProperties": { + "$ref": "Config" + }, + "description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.", + "type": "object" + }, + "name": { + "description": "The resource name of the RapidVulnerabilityDetectionSettings. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + "type": "string" + }, + "serviceEnablementState": { + "description": "The state of enablement for the service at its level of the resource hierarchy. A DISABLED state will override all module enablement_states to DISABLED.", + "enum": [ + "ENABLEMENT_STATE_UNSPECIFIED", + "INHERITED", + "ENABLED", + "DISABLED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "State is inherited from the parent resource.", + "State is enabled.", + "State is disabled." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The time the settings were last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Reference": { "description": "Additional Links", "id": "Reference", diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index 08a1e5f18f1..956caec8867 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -147,6 +147,7 @@ func NewFoldersService(s *Service) *FoldersService { rs := &FoldersService{s: s} rs.ContainerThreatDetectionSettings = NewFoldersContainerThreatDetectionSettingsService(s) rs.EventThreatDetectionSettings = NewFoldersEventThreatDetectionSettingsService(s) + rs.RapidVulnerabilityDetectionSettings = NewFoldersRapidVulnerabilityDetectionSettingsService(s) rs.SecurityHealthAnalyticsSettings = NewFoldersSecurityHealthAnalyticsSettingsService(s) rs.VirtualMachineThreatDetectionSettings = NewFoldersVirtualMachineThreatDetectionSettingsService(s) rs.WebSecurityScannerSettings = NewFoldersWebSecurityScannerSettingsService(s) @@ -160,6 +161,8 @@ type FoldersService struct { EventThreatDetectionSettings *FoldersEventThreatDetectionSettingsService + RapidVulnerabilityDetectionSettings *FoldersRapidVulnerabilityDetectionSettingsService + SecurityHealthAnalyticsSettings *FoldersSecurityHealthAnalyticsSettingsService VirtualMachineThreatDetectionSettings *FoldersVirtualMachineThreatDetectionSettingsService @@ -185,6 +188,15 @@ type FoldersEventThreatDetectionSettingsService struct { s *Service } +func NewFoldersRapidVulnerabilityDetectionSettingsService(s *Service) *FoldersRapidVulnerabilityDetectionSettingsService { + rs := &FoldersRapidVulnerabilityDetectionSettingsService{s: s} + return rs +} + +type FoldersRapidVulnerabilityDetectionSettingsService struct { + s *Service +} + func NewFoldersSecurityHealthAnalyticsSettingsService(s *Service) *FoldersSecurityHealthAnalyticsSettingsService { rs := &FoldersSecurityHealthAnalyticsSettingsService{s: s} return rs @@ -216,6 +228,7 @@ func NewOrganizationsService(s *Service) *OrganizationsService { rs := &OrganizationsService{s: s} rs.ContainerThreatDetectionSettings = NewOrganizationsContainerThreatDetectionSettingsService(s) rs.EventThreatDetectionSettings = NewOrganizationsEventThreatDetectionSettingsService(s) + rs.RapidVulnerabilityDetectionSettings = NewOrganizationsRapidVulnerabilityDetectionSettingsService(s) rs.SecurityHealthAnalyticsSettings = NewOrganizationsSecurityHealthAnalyticsSettingsService(s) rs.VirtualMachineThreatDetectionSettings = NewOrganizationsVirtualMachineThreatDetectionSettingsService(s) rs.WebSecurityScannerSettings = NewOrganizationsWebSecurityScannerSettingsService(s) @@ -229,6 +242,8 @@ type OrganizationsService struct { EventThreatDetectionSettings *OrganizationsEventThreatDetectionSettingsService + RapidVulnerabilityDetectionSettings *OrganizationsRapidVulnerabilityDetectionSettingsService + SecurityHealthAnalyticsSettings *OrganizationsSecurityHealthAnalyticsSettingsService VirtualMachineThreatDetectionSettings *OrganizationsVirtualMachineThreatDetectionSettingsService @@ -254,6 +269,15 @@ type OrganizationsEventThreatDetectionSettingsService struct { s *Service } +func NewOrganizationsRapidVulnerabilityDetectionSettingsService(s *Service) *OrganizationsRapidVulnerabilityDetectionSettingsService { + rs := &OrganizationsRapidVulnerabilityDetectionSettingsService{s: s} + return rs +} + +type OrganizationsRapidVulnerabilityDetectionSettingsService struct { + s *Service +} + func NewOrganizationsSecurityHealthAnalyticsSettingsService(s *Service) *OrganizationsSecurityHealthAnalyticsSettingsService { rs := &OrganizationsSecurityHealthAnalyticsSettingsService{s: s} return rs @@ -286,6 +310,7 @@ func NewProjectsService(s *Service) *ProjectsService { rs.ContainerThreatDetectionSettings = NewProjectsContainerThreatDetectionSettingsService(s) rs.EventThreatDetectionSettings = NewProjectsEventThreatDetectionSettingsService(s) rs.Locations = NewProjectsLocationsService(s) + rs.RapidVulnerabilityDetectionSettings = NewProjectsRapidVulnerabilityDetectionSettingsService(s) rs.SecurityHealthAnalyticsSettings = NewProjectsSecurityHealthAnalyticsSettingsService(s) rs.VirtualMachineThreatDetectionSettings = NewProjectsVirtualMachineThreatDetectionSettingsService(s) rs.WebSecurityScannerSettings = NewProjectsWebSecurityScannerSettingsService(s) @@ -301,6 +326,8 @@ type ProjectsService struct { Locations *ProjectsLocationsService + RapidVulnerabilityDetectionSettings *ProjectsRapidVulnerabilityDetectionSettingsService + SecurityHealthAnalyticsSettings *ProjectsSecurityHealthAnalyticsSettingsService VirtualMachineThreatDetectionSettings *ProjectsVirtualMachineThreatDetectionSettingsService @@ -359,6 +386,15 @@ type ProjectsLocationsClustersContainerThreatDetectionSettingsService struct { s *Service } +func NewProjectsRapidVulnerabilityDetectionSettingsService(s *Service) *ProjectsRapidVulnerabilityDetectionSettingsService { + rs := &ProjectsRapidVulnerabilityDetectionSettingsService{s: s} + return rs +} + +type ProjectsRapidVulnerabilityDetectionSettingsService struct { + s *Service +} + func NewProjectsSecurityHealthAnalyticsSettingsService(s *Service) *ProjectsSecurityHealthAnalyticsSettingsService { rs := &ProjectsSecurityHealthAnalyticsSettingsService{s: s} return rs @@ -2601,6 +2637,63 @@ func (s *ProcessSignature) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RapidVulnerabilityDetectionSettings: Resource capturing the settings +// for the Rapid Vulnerability Detection service. +type RapidVulnerabilityDetectionSettings struct { + // Modules: The configurations including the state of enablement for the + // service's different modules. The absence of a module in the map + // implies its configuration is inherited from its parent's. + Modules map[string]Config `json:"modules,omitempty"` + + // Name: The resource name of the RapidVulnerabilityDetectionSettings. + // Formats: * + // organizations/{organization}/rapidVulnerabilityDetectionSettings * + // folders/{folder}/rapidVulnerabilityDetectionSettings * + // projects/{project}/rapidVulnerabilityDetectionSettings + Name string `json:"name,omitempty"` + + // ServiceEnablementState: The state of enablement for the service at + // its level of the resource hierarchy. A DISABLED state will override + // all module enablement_states to DISABLED. + // + // Possible values: + // "ENABLEMENT_STATE_UNSPECIFIED" - Default value. This value is + // unused. + // "INHERITED" - State is inherited from the parent resource. + // "ENABLED" - State is enabled. + // "DISABLED" - State is disabled. + ServiceEnablementState string `json:"serviceEnablementState,omitempty"` + + // UpdateTime: Output only. The time the settings were last updated. + 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. "Modules") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Modules") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RapidVulnerabilityDetectionSettings) MarshalJSON() ([]byte, error) { + type NoMethod RapidVulnerabilityDetectionSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Reference: Additional Links type Reference struct { // Source: Source of the reference e.g. NVD @@ -3479,6 +3572,158 @@ func (c *FoldersGetOnboardingStateCall) Do(opts ...googleapi.CallOption) (*Onboa } +// method id "securitycenter.folders.getRapidVulnerabilityDetectionSettings": + +type FoldersGetRapidVulnerabilityDetectionSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetRapidVulnerabilityDetectionSettings: Get the +// RapidVulnerabilityDetectionSettings resource. +// +// - name: The name of the RapidVulnerabilityDetectionSettings to +// retrieve. Formats: * +// organizations/{organization}/rapidVulnerabilityDetectionSettings * +// folders/{folder}/rapidVulnerabilityDetectionSettings * +// projects/{project}/rapidVulnerabilityDetectionSettings. +func (r *FoldersService) GetRapidVulnerabilityDetectionSettings(name string) *FoldersGetRapidVulnerabilityDetectionSettingsCall { + c := &FoldersGetRapidVulnerabilityDetectionSettingsCall{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 *FoldersGetRapidVulnerabilityDetectionSettingsCall) Fields(s ...googleapi.Field) *FoldersGetRapidVulnerabilityDetectionSettingsCall { + 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 *FoldersGetRapidVulnerabilityDetectionSettingsCall) IfNoneMatch(entityTag string) *FoldersGetRapidVulnerabilityDetectionSettingsCall { + 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 *FoldersGetRapidVulnerabilityDetectionSettingsCall) Context(ctx context.Context) *FoldersGetRapidVulnerabilityDetectionSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FoldersGetRapidVulnerabilityDetectionSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersGetRapidVulnerabilityDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1beta2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "securitycenter.folders.getRapidVulnerabilityDetectionSettings" call. +// Exactly one of *RapidVulnerabilityDetectionSettings or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *RapidVulnerabilityDetectionSettings.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 *FoldersGetRapidVulnerabilityDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RapidVulnerabilityDetectionSettings{ + ServerResponse: googleapi.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 RapidVulnerabilityDetectionSettings resource.", + // "flatPath": "v1beta2/folders/{foldersId}/rapidVulnerabilityDetectionSettings", + // "httpMethod": "GET", + // "id": "securitycenter.folders.getRapidVulnerabilityDetectionSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the RapidVulnerabilityDetectionSettings to retrieve. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + // "location": "path", + // "pattern": "^folders/[^/]+/rapidVulnerabilityDetectionSettings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta2/{+name}", + // "response": { + // "$ref": "RapidVulnerabilityDetectionSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "securitycenter.folders.getSecurityCenterSettings": type FoldersGetSecurityCenterSettingsCall struct { @@ -4403,35 +4648,35 @@ func (c *FoldersUpdateEventThreatDetectionSettingsCall) Do(opts ...googleapi.Cal } -// method id "securitycenter.folders.updateSecurityHealthAnalyticsSettings": +// method id "securitycenter.folders.updateRapidVulnerabilityDetectionSettings": -type FoldersUpdateSecurityHealthAnalyticsSettingsCall struct { - s *Service - name string - securityhealthanalyticssettings *SecurityHealthAnalyticsSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersUpdateRapidVulnerabilityDetectionSettingsCall struct { + s *Service + name string + rapidvulnerabilitydetectionsettings *RapidVulnerabilityDetectionSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateSecurityHealthAnalyticsSettings: Update the -// SecurityHealthAnalyticsSettings resource. +// UpdateRapidVulnerabilityDetectionSettings: Update the +// RapidVulnerabilityDetectionSettings resource. // -// - name: The resource name of the SecurityHealthAnalyticsSettings. +// - name: The resource name of the RapidVulnerabilityDetectionSettings. // Formats: * -// organizations/{organization}/securityHealthAnalyticsSettings * -// folders/{folder}/securityHealthAnalyticsSettings * -// projects/{project}/securityHealthAnalyticsSettings. -func (r *FoldersService) UpdateSecurityHealthAnalyticsSettings(name string, securityhealthanalyticssettings *SecurityHealthAnalyticsSettings) *FoldersUpdateSecurityHealthAnalyticsSettingsCall { - c := &FoldersUpdateSecurityHealthAnalyticsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// organizations/{organization}/rapidVulnerabilityDetectionSettings * +// folders/{folder}/rapidVulnerabilityDetectionSettings * +// projects/{project}/rapidVulnerabilityDetectionSettings. +func (r *FoldersService) UpdateRapidVulnerabilityDetectionSettings(name string, rapidvulnerabilitydetectionsettings *RapidVulnerabilityDetectionSettings) *FoldersUpdateRapidVulnerabilityDetectionSettingsCall { + c := &FoldersUpdateRapidVulnerabilityDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.securityhealthanalyticssettings = securityhealthanalyticssettings + c.rapidvulnerabilitydetectionsettings = rapidvulnerabilitydetectionsettings return c } // UpdateMask sets the optional parameter "updateMask": The list of // fields to be updated. -func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) UpdateMask(updateMask string) *FoldersUpdateSecurityHealthAnalyticsSettingsCall { +func (c *FoldersUpdateRapidVulnerabilityDetectionSettingsCall) UpdateMask(updateMask string) *FoldersUpdateRapidVulnerabilityDetectionSettingsCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -4439,7 +4684,7 @@ func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) UpdateMask(updateMask // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Fields(s ...googleapi.Field) *FoldersUpdateSecurityHealthAnalyticsSettingsCall { +func (c *FoldersUpdateRapidVulnerabilityDetectionSettingsCall) Fields(s ...googleapi.Field) *FoldersUpdateRapidVulnerabilityDetectionSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4447,21 +4692,21 @@ func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Fields(s ...googleapi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Context(ctx context.Context) *FoldersUpdateSecurityHealthAnalyticsSettingsCall { +func (c *FoldersUpdateRapidVulnerabilityDetectionSettingsCall) Context(ctx context.Context) *FoldersUpdateRapidVulnerabilityDetectionSettingsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Header() http.Header { +func (c *FoldersUpdateRapidVulnerabilityDetectionSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersUpdateRapidVulnerabilityDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4469,7 +4714,7 @@ func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.securityhealthanalyticssettings) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.rapidvulnerabilitydetectionsettings) if err != nil { return nil, err } @@ -4489,14 +4734,15 @@ func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "securitycenter.folders.updateSecurityHealthAnalyticsSettings" call. -// Exactly one of *SecurityHealthAnalyticsSettings or error will be +// Do executes the "securitycenter.folders.updateRapidVulnerabilityDetectionSettings" call. +// Exactly one of *RapidVulnerabilityDetectionSettings or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *SecurityHealthAnalyticsSettings.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 *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Do(opts ...googleapi.CallOption) (*SecurityHealthAnalyticsSettings, error) { +// either *RapidVulnerabilityDetectionSettings.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 *FoldersUpdateRapidVulnerabilityDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4515,7 +4761,7 @@ func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &SecurityHealthAnalyticsSettings{ + ret := &RapidVulnerabilityDetectionSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4527,18 +4773,18 @@ func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Update the SecurityHealthAnalyticsSettings resource.", - // "flatPath": "v1beta2/folders/{foldersId}/securityHealthAnalyticsSettings", + // "description": "Update the RapidVulnerabilityDetectionSettings resource.", + // "flatPath": "v1beta2/folders/{foldersId}/rapidVulnerabilityDetectionSettings", // "httpMethod": "PATCH", - // "id": "securitycenter.folders.updateSecurityHealthAnalyticsSettings", + // "id": "securitycenter.folders.updateRapidVulnerabilityDetectionSettings", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", + // "description": "The resource name of the RapidVulnerabilityDetectionSettings. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", // "location": "path", - // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", + // "pattern": "^folders/[^/]+/rapidVulnerabilityDetectionSettings$", // "required": true, // "type": "string" // }, @@ -4551,10 +4797,10 @@ func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Do(opts ...googleapi. // }, // "path": "v1beta2/{+name}", // "request": { - // "$ref": "SecurityHealthAnalyticsSettings" + // "$ref": "RapidVulnerabilityDetectionSettings" // }, // "response": { - // "$ref": "SecurityHealthAnalyticsSettings" + // "$ref": "RapidVulnerabilityDetectionSettings" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4563,27 +4809,187 @@ func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Do(opts ...googleapi. } -// method id "securitycenter.folders.updateVirtualMachineThreatDetectionSettings": +// method id "securitycenter.folders.updateSecurityHealthAnalyticsSettings": -type FoldersUpdateVirtualMachineThreatDetectionSettingsCall struct { - s *Service - name string - virtualmachinethreatdetectionsettings *VirtualMachineThreatDetectionSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersUpdateSecurityHealthAnalyticsSettingsCall struct { + s *Service + name string + securityhealthanalyticssettings *SecurityHealthAnalyticsSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateVirtualMachineThreatDetectionSettings: Update the -// VirtualMachineThreatDetectionSettings resource. +// UpdateSecurityHealthAnalyticsSettings: Update the +// SecurityHealthAnalyticsSettings resource. // -// - name: The resource name of the -// VirtualMachineThreatDetectionSettings. Formats: * -// organizations/{organization}/virtualMachineThreatDetectionSettings -// * folders/{folder}/virtualMachineThreatDetectionSettings * -// projects/{project}/virtualMachineThreatDetectionSettings. -func (r *FoldersService) UpdateVirtualMachineThreatDetectionSettings(name string, virtualmachinethreatdetectionsettings *VirtualMachineThreatDetectionSettings) *FoldersUpdateVirtualMachineThreatDetectionSettingsCall { - c := &FoldersUpdateVirtualMachineThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the SecurityHealthAnalyticsSettings. +// Formats: * +// organizations/{organization}/securityHealthAnalyticsSettings * +// folders/{folder}/securityHealthAnalyticsSettings * +// projects/{project}/securityHealthAnalyticsSettings. +func (r *FoldersService) UpdateSecurityHealthAnalyticsSettings(name string, securityhealthanalyticssettings *SecurityHealthAnalyticsSettings) *FoldersUpdateSecurityHealthAnalyticsSettingsCall { + c := &FoldersUpdateSecurityHealthAnalyticsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.securityhealthanalyticssettings = securityhealthanalyticssettings + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) UpdateMask(updateMask string) *FoldersUpdateSecurityHealthAnalyticsSettingsCall { + 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 *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Fields(s ...googleapi.Field) *FoldersUpdateSecurityHealthAnalyticsSettingsCall { + 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 *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Context(ctx context.Context) *FoldersUpdateSecurityHealthAnalyticsSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.securityhealthanalyticssettings) + 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, "v1beta2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + 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 "securitycenter.folders.updateSecurityHealthAnalyticsSettings" call. +// Exactly one of *SecurityHealthAnalyticsSettings or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *SecurityHealthAnalyticsSettings.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 *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Do(opts ...googleapi.CallOption) (*SecurityHealthAnalyticsSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &SecurityHealthAnalyticsSettings{ + ServerResponse: googleapi.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 SecurityHealthAnalyticsSettings resource.", + // "flatPath": "v1beta2/folders/{foldersId}/securityHealthAnalyticsSettings", + // "httpMethod": "PATCH", + // "id": "securitycenter.folders.updateSecurityHealthAnalyticsSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", + // "location": "path", + // "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta2/{+name}", + // "request": { + // "$ref": "SecurityHealthAnalyticsSettings" + // }, + // "response": { + // "$ref": "SecurityHealthAnalyticsSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.folders.updateVirtualMachineThreatDetectionSettings": + +type FoldersUpdateVirtualMachineThreatDetectionSettingsCall struct { + s *Service + name string + virtualmachinethreatdetectionsettings *VirtualMachineThreatDetectionSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateVirtualMachineThreatDetectionSettings: Update the +// VirtualMachineThreatDetectionSettings resource. +// +// - name: The resource name of the +// VirtualMachineThreatDetectionSettings. Formats: * +// organizations/{organization}/virtualMachineThreatDetectionSettings +// * folders/{folder}/virtualMachineThreatDetectionSettings * +// projects/{project}/virtualMachineThreatDetectionSettings. +func (r *FoldersService) UpdateVirtualMachineThreatDetectionSettings(name string, virtualmachinethreatdetectionsettings *VirtualMachineThreatDetectionSettings) *FoldersUpdateVirtualMachineThreatDetectionSettingsCall { + c := &FoldersUpdateVirtualMachineThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name c.virtualmachinethreatdetectionsettings = virtualmachinethreatdetectionsettings return c @@ -5148,7 +5554,160 @@ func (c *FoldersEventThreatDetectionSettingsCalculateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &EventThreatDetectionSettings{ + ret := &EventThreatDetectionSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Calculates the effective EventThreatDetectionSettings based on its level in the resource hierarchy and its settings.", + // "flatPath": "v1beta2/folders/{foldersId}/eventThreatDetectionSettings:calculate", + // "httpMethod": "GET", + // "id": "securitycenter.folders.eventThreatDetectionSettings.calculate", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the EventThreatDetectionSettings to calculate. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", + // "location": "path", + // "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta2/{+name}:calculate", + // "response": { + // "$ref": "EventThreatDetectionSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.folders.rapidVulnerabilityDetectionSettings.calculate": + +type FoldersRapidVulnerabilityDetectionSettingsCalculateCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Calculate: Calculates the effective +// RapidVulnerabilityDetectionSettings based on its level in the +// resource hierarchy and its settings. +// +// - name: The name of the RapidVulnerabilityDetectionSettings to +// calculate. Formats: * +// organizations/{organization}/rapidVulnerabilityDetectionSettings * +// folders/{folder}/rapidVulnerabilityDetectionSettings * +// projects/{project}/rapidVulnerabilityDetectionSettings. +func (r *FoldersRapidVulnerabilityDetectionSettingsService) Calculate(name string) *FoldersRapidVulnerabilityDetectionSettingsCalculateCall { + c := &FoldersRapidVulnerabilityDetectionSettingsCalculateCall{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 *FoldersRapidVulnerabilityDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *FoldersRapidVulnerabilityDetectionSettingsCalculateCall { + 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 *FoldersRapidVulnerabilityDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *FoldersRapidVulnerabilityDetectionSettingsCalculateCall { + 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 *FoldersRapidVulnerabilityDetectionSettingsCalculateCall) Context(ctx context.Context) *FoldersRapidVulnerabilityDetectionSettingsCalculateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FoldersRapidVulnerabilityDetectionSettingsCalculateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersRapidVulnerabilityDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1beta2/{+name}:calculate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "securitycenter.folders.rapidVulnerabilityDetectionSettings.calculate" call. +// Exactly one of *RapidVulnerabilityDetectionSettings or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *RapidVulnerabilityDetectionSettings.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 *FoldersRapidVulnerabilityDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RapidVulnerabilityDetectionSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5160,25 +5719,25 @@ func (c *FoldersEventThreatDetectionSettingsCalculateCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Calculates the effective EventThreatDetectionSettings based on its level in the resource hierarchy and its settings.", - // "flatPath": "v1beta2/folders/{foldersId}/eventThreatDetectionSettings:calculate", + // "description": "Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings.", + // "flatPath": "v1beta2/folders/{foldersId}/rapidVulnerabilityDetectionSettings:calculate", // "httpMethod": "GET", - // "id": "securitycenter.folders.eventThreatDetectionSettings.calculate", + // "id": "securitycenter.folders.rapidVulnerabilityDetectionSettings.calculate", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the EventThreatDetectionSettings to calculate. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", + // "description": "Required. The name of the RapidVulnerabilityDetectionSettings to calculate. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", // "location": "path", - // "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", + // "pattern": "^folders/[^/]+/rapidVulnerabilityDetectionSettings$", // "required": true, // "type": "string" // } // }, // "path": "v1beta2/{+name}:calculate", // "response": { - // "$ref": "EventThreatDetectionSettings" + // "$ref": "RapidVulnerabilityDetectionSettings" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6094,6 +6653,158 @@ func (c *OrganizationsGetOnboardingStateCall) Do(opts ...googleapi.CallOption) ( } +// method id "securitycenter.organizations.getRapidVulnerabilityDetectionSettings": + +type OrganizationsGetRapidVulnerabilityDetectionSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetRapidVulnerabilityDetectionSettings: Get the +// RapidVulnerabilityDetectionSettings resource. +// +// - name: The name of the RapidVulnerabilityDetectionSettings to +// retrieve. Formats: * +// organizations/{organization}/rapidVulnerabilityDetectionSettings * +// folders/{folder}/rapidVulnerabilityDetectionSettings * +// projects/{project}/rapidVulnerabilityDetectionSettings. +func (r *OrganizationsService) GetRapidVulnerabilityDetectionSettings(name string) *OrganizationsGetRapidVulnerabilityDetectionSettingsCall { + c := &OrganizationsGetRapidVulnerabilityDetectionSettingsCall{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 *OrganizationsGetRapidVulnerabilityDetectionSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetRapidVulnerabilityDetectionSettingsCall { + 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 *OrganizationsGetRapidVulnerabilityDetectionSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetRapidVulnerabilityDetectionSettingsCall { + 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 *OrganizationsGetRapidVulnerabilityDetectionSettingsCall) Context(ctx context.Context) *OrganizationsGetRapidVulnerabilityDetectionSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsGetRapidVulnerabilityDetectionSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsGetRapidVulnerabilityDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1beta2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "securitycenter.organizations.getRapidVulnerabilityDetectionSettings" call. +// Exactly one of *RapidVulnerabilityDetectionSettings or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *RapidVulnerabilityDetectionSettings.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 *OrganizationsGetRapidVulnerabilityDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RapidVulnerabilityDetectionSettings{ + ServerResponse: googleapi.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 RapidVulnerabilityDetectionSettings resource.", + // "flatPath": "v1beta2/organizations/{organizationsId}/rapidVulnerabilityDetectionSettings", + // "httpMethod": "GET", + // "id": "securitycenter.organizations.getRapidVulnerabilityDetectionSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the RapidVulnerabilityDetectionSettings to retrieve. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + // "location": "path", + // "pattern": "^organizations/[^/]+/rapidVulnerabilityDetectionSettings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta2/{+name}", + // "response": { + // "$ref": "RapidVulnerabilityDetectionSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "securitycenter.organizations.getSecurityCenterSettings": type OrganizationsGetSecurityCenterSettingsCall struct { @@ -7132,15 +7843,176 @@ func (c *OrganizationsUpdateEventThreatDetectionSettingsCall) Do(opts ...googlea // "description": "Update the EventThreatDetectionSettings resource.", // "flatPath": "v1beta2/organizations/{organizationsId}/eventThreatDetectionSettings", // "httpMethod": "PATCH", - // "id": "securitycenter.organizations.updateEventThreatDetectionSettings", + // "id": "securitycenter.organizations.updateEventThreatDetectionSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", + // "location": "path", + // "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta2/{+name}", + // "request": { + // "$ref": "EventThreatDetectionSettings" + // }, + // "response": { + // "$ref": "EventThreatDetectionSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.organizations.updateRapidVulnerabilityDetectionSettings": + +type OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall struct { + s *Service + name string + rapidvulnerabilitydetectionsettings *RapidVulnerabilityDetectionSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateRapidVulnerabilityDetectionSettings: Update the +// RapidVulnerabilityDetectionSettings resource. +// +// - name: The resource name of the RapidVulnerabilityDetectionSettings. +// Formats: * +// organizations/{organization}/rapidVulnerabilityDetectionSettings * +// folders/{folder}/rapidVulnerabilityDetectionSettings * +// projects/{project}/rapidVulnerabilityDetectionSettings. +func (r *OrganizationsService) UpdateRapidVulnerabilityDetectionSettings(name string, rapidvulnerabilitydetectionsettings *RapidVulnerabilityDetectionSettings) *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall { + c := &OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rapidvulnerabilitydetectionsettings = rapidvulnerabilitydetectionsettings + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall { + 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 *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall { + 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 *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall) Context(ctx context.Context) *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.rapidvulnerabilitydetectionsettings) + 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, "v1beta2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + 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 "securitycenter.organizations.updateRapidVulnerabilityDetectionSettings" call. +// Exactly one of *RapidVulnerabilityDetectionSettings or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *RapidVulnerabilityDetectionSettings.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 *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RapidVulnerabilityDetectionSettings{ + ServerResponse: googleapi.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 RapidVulnerabilityDetectionSettings resource.", + // "flatPath": "v1beta2/organizations/{organizationsId}/rapidVulnerabilityDetectionSettings", + // "httpMethod": "PATCH", + // "id": "securitycenter.organizations.updateRapidVulnerabilityDetectionSettings", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", + // "description": "The resource name of the RapidVulnerabilityDetectionSettings. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", // "location": "path", - // "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", + // "pattern": "^organizations/[^/]+/rapidVulnerabilityDetectionSettings$", // "required": true, // "type": "string" // }, @@ -7153,10 +8025,10 @@ func (c *OrganizationsUpdateEventThreatDetectionSettingsCall) Do(opts ...googlea // }, // "path": "v1beta2/{+name}", // "request": { - // "$ref": "EventThreatDetectionSettings" + // "$ref": "RapidVulnerabilityDetectionSettings" // }, // "response": { - // "$ref": "EventThreatDetectionSettings" + // "$ref": "RapidVulnerabilityDetectionSettings" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7949,6 +8821,159 @@ func (c *OrganizationsEventThreatDetectionSettingsCalculateCall) Do(opts ...goog } +// method id "securitycenter.organizations.rapidVulnerabilityDetectionSettings.calculate": + +type OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Calculate: Calculates the effective +// RapidVulnerabilityDetectionSettings based on its level in the +// resource hierarchy and its settings. +// +// - name: The name of the RapidVulnerabilityDetectionSettings to +// calculate. Formats: * +// organizations/{organization}/rapidVulnerabilityDetectionSettings * +// folders/{folder}/rapidVulnerabilityDetectionSettings * +// projects/{project}/rapidVulnerabilityDetectionSettings. +func (r *OrganizationsRapidVulnerabilityDetectionSettingsService) Calculate(name string) *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall { + c := &OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall{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 *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall { + 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 *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall { + 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 *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall) Context(ctx context.Context) *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1beta2/{+name}:calculate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "securitycenter.organizations.rapidVulnerabilityDetectionSettings.calculate" call. +// Exactly one of *RapidVulnerabilityDetectionSettings or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *RapidVulnerabilityDetectionSettings.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 *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RapidVulnerabilityDetectionSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings.", + // "flatPath": "v1beta2/organizations/{organizationsId}/rapidVulnerabilityDetectionSettings:calculate", + // "httpMethod": "GET", + // "id": "securitycenter.organizations.rapidVulnerabilityDetectionSettings.calculate", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the RapidVulnerabilityDetectionSettings to calculate. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + // "location": "path", + // "pattern": "^organizations/[^/]+/rapidVulnerabilityDetectionSettings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta2/{+name}:calculate", + // "response": { + // "$ref": "RapidVulnerabilityDetectionSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "securitycenter.organizations.securityHealthAnalyticsSettings.calculate": type OrganizationsSecurityHealthAnalyticsSettingsCalculateCall struct { @@ -8817,7 +9842,159 @@ func (c *ProjectsGetOnboardingStateCall) Do(opts ...googleapi.CallOption) (*Onbo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &OnboardingState{ + ret := &OnboardingState{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve the OnboardingState of a resource.", + // "flatPath": "v1beta2/projects/{projectsId}/onboardingState", + // "httpMethod": "GET", + // "id": "securitycenter.projects.getOnboardingState", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the OnboardingState to retrieve. Formats: * organizations/{organization}/onboardingState * folders/{folder}/onboardingState * projects/{project}/onboardingState", + // "location": "path", + // "pattern": "^projects/[^/]+/onboardingState$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta2/{+name}", + // "response": { + // "$ref": "OnboardingState" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "securitycenter.projects.getRapidVulnerabilityDetectionSettings": + +type ProjectsGetRapidVulnerabilityDetectionSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetRapidVulnerabilityDetectionSettings: Get the +// RapidVulnerabilityDetectionSettings resource. +// +// - name: The name of the RapidVulnerabilityDetectionSettings to +// retrieve. Formats: * +// organizations/{organization}/rapidVulnerabilityDetectionSettings * +// folders/{folder}/rapidVulnerabilityDetectionSettings * +// projects/{project}/rapidVulnerabilityDetectionSettings. +func (r *ProjectsService) GetRapidVulnerabilityDetectionSettings(name string) *ProjectsGetRapidVulnerabilityDetectionSettingsCall { + c := &ProjectsGetRapidVulnerabilityDetectionSettingsCall{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 *ProjectsGetRapidVulnerabilityDetectionSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetRapidVulnerabilityDetectionSettingsCall { + 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 *ProjectsGetRapidVulnerabilityDetectionSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetRapidVulnerabilityDetectionSettingsCall { + 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 *ProjectsGetRapidVulnerabilityDetectionSettingsCall) Context(ctx context.Context) *ProjectsGetRapidVulnerabilityDetectionSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsGetRapidVulnerabilityDetectionSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsGetRapidVulnerabilityDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1beta2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "securitycenter.projects.getRapidVulnerabilityDetectionSettings" call. +// Exactly one of *RapidVulnerabilityDetectionSettings or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *RapidVulnerabilityDetectionSettings.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 *ProjectsGetRapidVulnerabilityDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RapidVulnerabilityDetectionSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8829,25 +10006,25 @@ func (c *ProjectsGetOnboardingStateCall) Do(opts ...googleapi.CallOption) (*Onbo } return ret, nil // { - // "description": "Retrieve the OnboardingState of a resource.", - // "flatPath": "v1beta2/projects/{projectsId}/onboardingState", + // "description": "Get the RapidVulnerabilityDetectionSettings resource.", + // "flatPath": "v1beta2/projects/{projectsId}/rapidVulnerabilityDetectionSettings", // "httpMethod": "GET", - // "id": "securitycenter.projects.getOnboardingState", + // "id": "securitycenter.projects.getRapidVulnerabilityDetectionSettings", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the OnboardingState to retrieve. Formats: * organizations/{organization}/onboardingState * folders/{folder}/onboardingState * projects/{project}/onboardingState", + // "description": "Required. The name of the RapidVulnerabilityDetectionSettings to retrieve. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", // "location": "path", - // "pattern": "^projects/[^/]+/onboardingState$", + // "pattern": "^projects/[^/]+/rapidVulnerabilityDetectionSettings$", // "required": true, // "type": "string" // } // }, // "path": "v1beta2/{+name}", // "response": { - // "$ref": "OnboardingState" + // "$ref": "RapidVulnerabilityDetectionSettings" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9780,6 +10957,167 @@ func (c *ProjectsUpdateEventThreatDetectionSettingsCall) Do(opts ...googleapi.Ca } +// method id "securitycenter.projects.updateRapidVulnerabilityDetectionSettings": + +type ProjectsUpdateRapidVulnerabilityDetectionSettingsCall struct { + s *Service + name string + rapidvulnerabilitydetectionsettings *RapidVulnerabilityDetectionSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateRapidVulnerabilityDetectionSettings: Update the +// RapidVulnerabilityDetectionSettings resource. +// +// - name: The resource name of the RapidVulnerabilityDetectionSettings. +// Formats: * +// organizations/{organization}/rapidVulnerabilityDetectionSettings * +// folders/{folder}/rapidVulnerabilityDetectionSettings * +// projects/{project}/rapidVulnerabilityDetectionSettings. +func (r *ProjectsService) UpdateRapidVulnerabilityDetectionSettings(name string, rapidvulnerabilitydetectionsettings *RapidVulnerabilityDetectionSettings) *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall { + c := &ProjectsUpdateRapidVulnerabilityDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rapidvulnerabilitydetectionsettings = rapidvulnerabilitydetectionsettings + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall) UpdateMask(updateMask string) *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall { + 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 *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall) Fields(s ...googleapi.Field) *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall { + 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 *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall) Context(ctx context.Context) *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.rapidvulnerabilitydetectionsettings) + 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, "v1beta2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + 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 "securitycenter.projects.updateRapidVulnerabilityDetectionSettings" call. +// Exactly one of *RapidVulnerabilityDetectionSettings or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *RapidVulnerabilityDetectionSettings.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 *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RapidVulnerabilityDetectionSettings{ + ServerResponse: googleapi.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 RapidVulnerabilityDetectionSettings resource.", + // "flatPath": "v1beta2/projects/{projectsId}/rapidVulnerabilityDetectionSettings", + // "httpMethod": "PATCH", + // "id": "securitycenter.projects.updateRapidVulnerabilityDetectionSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name of the RapidVulnerabilityDetectionSettings. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + // "location": "path", + // "pattern": "^projects/[^/]+/rapidVulnerabilityDetectionSettings$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta2/{+name}", + // "request": { + // "$ref": "RapidVulnerabilityDetectionSettings" + // }, + // "response": { + // "$ref": "RapidVulnerabilityDetectionSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "securitycenter.projects.updateSecurityHealthAnalyticsSettings": type ProjectsUpdateSecurityHealthAnalyticsSettingsCall struct { @@ -11032,6 +12370,159 @@ func (c *ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall) } +// method id "securitycenter.projects.rapidVulnerabilityDetectionSettings.calculate": + +type ProjectsRapidVulnerabilityDetectionSettingsCalculateCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Calculate: Calculates the effective +// RapidVulnerabilityDetectionSettings based on its level in the +// resource hierarchy and its settings. +// +// - name: The name of the RapidVulnerabilityDetectionSettings to +// calculate. Formats: * +// organizations/{organization}/rapidVulnerabilityDetectionSettings * +// folders/{folder}/rapidVulnerabilityDetectionSettings * +// projects/{project}/rapidVulnerabilityDetectionSettings. +func (r *ProjectsRapidVulnerabilityDetectionSettingsService) Calculate(name string) *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall { + c := &ProjectsRapidVulnerabilityDetectionSettingsCalculateCall{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 *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall { + 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 *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall { + 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 *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall) Context(ctx context.Context) *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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, "v1beta2/{+name}:calculate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "securitycenter.projects.rapidVulnerabilityDetectionSettings.calculate" call. +// Exactly one of *RapidVulnerabilityDetectionSettings or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *RapidVulnerabilityDetectionSettings.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 *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RapidVulnerabilityDetectionSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings.", + // "flatPath": "v1beta2/projects/{projectsId}/rapidVulnerabilityDetectionSettings:calculate", + // "httpMethod": "GET", + // "id": "securitycenter.projects.rapidVulnerabilityDetectionSettings.calculate", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the RapidVulnerabilityDetectionSettings to calculate. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", + // "location": "path", + // "pattern": "^projects/[^/]+/rapidVulnerabilityDetectionSettings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta2/{+name}:calculate", + // "response": { + // "$ref": "RapidVulnerabilityDetectionSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "securitycenter.projects.securityHealthAnalyticsSettings.calculate": type ProjectsSecurityHealthAnalyticsSettingsCalculateCall struct { diff --git a/sheets/v4/sheets-api.json b/sheets/v4/sheets-api.json index b7655ac4c69..17dbe6a550e 100644 --- a/sheets/v4/sheets-api.json +++ b/sheets/v4/sheets-api.json @@ -870,7 +870,7 @@ } } }, - "revision": "20220613", + "revision": "20220620", "rootUrl": "https://sheets.googleapis.com/", "schemas": { "AddBandingRequest": { @@ -2930,7 +2930,7 @@ "properties": { "rgbColor": { "$ref": "Color", - "description": "RGB color." + "description": "RGB color. The [`alpha`](/sheets/api/reference/rest/v4/spreadsheets/other#Color.FIELDS.alpha) value in the [`Color`](/sheets/api/reference/rest/v4/spreadsheets/other#color) object isn't generally supported." }, "themeColor": { "description": "Theme color.", diff --git a/sheets/v4/sheets-gen.go b/sheets/v4/sheets-gen.go index 8b718d8ca5a..85874cd1bc4 100644 --- a/sheets/v4/sheets-gen.go +++ b/sheets/v4/sheets-gen.go @@ -3721,7 +3721,11 @@ func (s *Color) UnmarshalJSON(data []byte) error { // ColorStyle: A color value. type ColorStyle struct { - // RgbColor: RGB color. + // RgbColor: RGB color. The `alpha` + // (/sheets/api/reference/rest/v4/spreadsheets/other#Color.FIELDS.alpha) + // value in the `Color` + // (/sheets/api/reference/rest/v4/spreadsheets/other#color) object isn't + // generally supported. RgbColor *Color `json:"rgbColor,omitempty"` // ThemeColor: Theme color.