From 8994f8854137f92c5d6b3d6512113da1ba81a764 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 2 Jun 2022 07:13:43 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- admin/directory/v1/admin-api.json | 10 +- admin/directory/v1/admin-gen.go | 22 +- api-list.json | 15 + apigee/v1/apigee-api.json | 395 +- apigee/v1/apigee-gen.go | 9127 +++++++++++++--------- cloudasset/v1/cloudasset-api.json | 9 +- cloudasset/v1/cloudasset-gen.go | 22 +- cloudasset/v1beta1/cloudasset-api.json | 9 +- cloudasset/v1beta1/cloudasset-gen.go | 22 +- cloudasset/v1p1beta1/cloudasset-api.json | 9 +- cloudasset/v1p1beta1/cloudasset-gen.go | 22 +- cloudasset/v1p4beta1/cloudasset-api.json | 9 +- cloudasset/v1p4beta1/cloudasset-gen.go | 22 +- cloudasset/v1p5beta1/cloudasset-api.json | 9 +- cloudasset/v1p5beta1/cloudasset-gen.go | 22 +- cloudasset/v1p7beta1/cloudasset-api.json | 9 +- cloudasset/v1p7beta1/cloudasset-gen.go | 22 +- firebase/v1beta1/firebase-api.json | 8 +- firebase/v1beta1/firebase-gen.go | 10 +- games/v1/games-api.json | 32 +- games/v1/games-gen.go | 171 + people/v1/people-api.json | 6 +- people/v1/people-gen.go | 33 +- 23 files changed, 6379 insertions(+), 3636 deletions(-) diff --git a/admin/directory/v1/admin-api.json b/admin/directory/v1/admin-api.json index ccc5ec7fb9c..1f9b6be80ee 100644 --- a/admin/directory/v1/admin-api.json +++ b/admin/directory/v1/admin-api.json @@ -4407,7 +4407,7 @@ } } }, - "revision": "20220325", + "revision": "20220531", "rootUrl": "https://admin.googleapis.com/", "schemas": { "Alias": { @@ -5910,11 +5910,11 @@ "id": "Group", "properties": { "adminCreated": { - "description": "Value is `true` if this group was created by an administrator rather than a user.", + "description": "Read-only. Value is `true` if this group was created by an administrator rather than a user.", "type": "boolean" }, "aliases": { - "description": "List of a group's alias email addresses.", + "description": "Read-only. A list of a group's alias email addresses.", "items": { "type": "string" }, @@ -5943,7 +5943,7 @@ "type": "string" }, "id": { - "description": "The unique ID of a group. A group `id` can be used as a group request URI's `groupKey`.", + "description": "Read-only. The unique ID of a group. A group `id` can be used as a group request URI's `groupKey`.", "type": "string" }, "kind": { @@ -5956,7 +5956,7 @@ "type": "string" }, "nonEditableAliases": { - "description": "List of the group's non-editable alias email addresses that are outside of the account's primary domain or subdomains. These are functioning email addresses used by the group. This is a read-only property returned in the API's response for a group. If edited in a group's POST or PUT request, the edit is ignored by the API service.", + "description": "Read-only. A list of the group's non-editable alias email addresses that are outside of the account's primary domain or subdomains. These are functioning email addresses used by the group. This is a read-only property returned in the API's response for a group. If edited in a group's POST or PUT request, the edit is ignored by the API service.", "items": { "type": "string" }, diff --git a/admin/directory/v1/admin-gen.go b/admin/directory/v1/admin-gen.go index 0860a3383c1..a499d38ef83 100644 --- a/admin/directory/v1/admin-gen.go +++ b/admin/directory/v1/admin-gen.go @@ -2989,11 +2989,11 @@ func (s *Features) MarshalJSON() ([]byte, error) { // information about common tasks, see the Developer's Guide // (/admin-sdk/directory/v1/guides/manage-groups). type Group struct { - // AdminCreated: Value is `true` if this group was created by an - // administrator rather than a user. + // AdminCreated: Read-only. Value is `true` if this group was created by + // an administrator rather than a user. AdminCreated bool `json:"adminCreated,omitempty"` - // Aliases: List of a group's alias email addresses. + // Aliases: Read-only. A list of a group's alias email addresses. Aliases []string `json:"aliases,omitempty"` // Description: An extended description to help users determine the @@ -3020,8 +3020,8 @@ type Group struct { // Etag: ETag of the resource. Etag string `json:"etag,omitempty"` - // Id: The unique ID of a group. A group `id` can be used as a group - // request URI's `groupKey`. + // Id: Read-only. The unique ID of a group. A group `id` can be used as + // a group request URI's `groupKey`. Id string `json:"id,omitempty"` // Kind: The type of the API resource. For Groups resources, the value @@ -3031,12 +3031,12 @@ type Group struct { // Name: The group's display name. Name string `json:"name,omitempty"` - // NonEditableAliases: List of the group's non-editable alias email - // addresses that are outside of the account's primary domain or - // subdomains. These are functioning email addresses used by the group. - // This is a read-only property returned in the API's response for a - // group. If edited in a group's POST or PUT request, the edit is - // ignored by the API service. + // NonEditableAliases: Read-only. A list of the group's non-editable + // alias email addresses that are outside of the account's primary + // domain or subdomains. These are functioning email addresses used by + // the group. This is a read-only property returned in the API's + // response for a group. If edited in a group's POST or PUT request, the + // edit is ignored by the API service. NonEditableAliases []string `json:"nonEditableAliases,omitempty"` // ServerResponse contains the HTTP response code and headers from the diff --git a/api-list.json b/api-list.json index d8bcd3c5357..3b78a9d5ae7 100644 --- a/api-list.json +++ b/api-list.json @@ -571,6 +571,21 @@ "documentationLink": "https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "baremetalsolution:v1alpha1", + "name": "baremetalsolution", + "version": "v1alpha1", + "title": "Bare Metal Solution API", + "description": "Provides ways to manage Bare Metal Solution hardware installed in a regional extension located near a Google Cloud data center.", + "discoveryRestUrl": "https://baremetalsolution.googleapis.com/$discovery/rest?version=v1alpha1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/bare-metal", + "preferred": false + }, { "kind": "discovery#directoryItem", "id": "baremetalsolution:v1", diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index d329ff1f0aa..86acdc06d10 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -1347,6 +1347,126 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "entries": { + "methods": { + "create": { + "description": "Creates key value entries in a org, env or apis scoped key value map.", + "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps/{keyvaluemapsId}/entries", + "httpMethod": "POST", + "id": "apigee.organizations.apis.keyvaluemaps.entries.create", + "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 formats in your request: `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", + "location": "path", + "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/entries", + "request": { + "$ref": "GoogleCloudApigeeV1KeyValueEntry" + }, + "response": { + "$ref": "GoogleCloudApigeeV1KeyValueEntry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a key value entry from an org, environment or apis scoped key value map.", + "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. Scope as indicated by the URI in which to delete the key value map entry. Use one of the following formats 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/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApigeeV1KeyValueEntry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "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": [ + "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 formats 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/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApigeeV1KeyValueEntry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "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": [ + "parent" + ], + "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, a key value entry returned from a previous call that can use 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 formats in your request: `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", + "location": "path", + "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/entries", + "response": { + "$ref": "GoogleCloudApigeeV1ListKeyValueEntriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } } }, "revisions": { @@ -4935,6 +5055,126 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "entries": { + "methods": { + "create": { + "description": "Creates key value entries in a org, env or apis scoped key value map.", + "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps/{keyvaluemapsId}/entries", + "httpMethod": "POST", + "id": "apigee.organizations.environments.keyvaluemaps.entries.create", + "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 formats in your request: `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", + "location": "path", + "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/entries", + "request": { + "$ref": "GoogleCloudApigeeV1KeyValueEntry" + }, + "response": { + "$ref": "GoogleCloudApigeeV1KeyValueEntry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a key value entry from an org, environment or apis scoped key value map.", + "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. Scope as indicated by the URI in which to delete the key value map entry. Use one of the following formats 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/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApigeeV1KeyValueEntry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "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. Scope as indicated by the URI in which to fetch the key value map entry/value. Use one of the following formats 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/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApigeeV1KeyValueEntry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "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.keyvaluemaps.entries.list", + "parameterOrder": [ + "parent" + ], + "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, a key value entry returned from a previous call that can use 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 formats in your request: `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", + "location": "path", + "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/entries", + "response": { + "$ref": "GoogleCloudApigeeV1ListKeyValueEntriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } } }, "optimizedStats": { @@ -6860,6 +7100,126 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "entries": { + "methods": { + "create": { + "description": "Creates key value entries in a org, env or apis scoped key value map.", + "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps/{keyvaluemapsId}/entries", + "httpMethod": "POST", + "id": "apigee.organizations.keyvaluemaps.entries.create", + "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 formats in your request: `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", + "location": "path", + "pattern": "^organizations/[^/]+/keyvaluemaps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/entries", + "request": { + "$ref": "GoogleCloudApigeeV1KeyValueEntry" + }, + "response": { + "$ref": "GoogleCloudApigeeV1KeyValueEntry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a key value entry from an org, environment or apis scoped key value map.", + "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", + "httpMethod": "DELETE", + "id": "apigee.organizations.keyvaluemaps.entries.delete", + "parameterOrder": [ + "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 formats 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/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApigeeV1KeyValueEntry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "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", + "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 formats 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/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApigeeV1KeyValueEntry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "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.keyvaluemaps.entries.list", + "parameterOrder": [ + "parent" + ], + "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, a key value entry returned from a previous call that can use 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 formats in your request: `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", + "location": "path", + "pattern": "^organizations/[^/]+/keyvaluemaps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/entries", + "response": { + "$ref": "GoogleCloudApigeeV1ListKeyValueEntriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } } }, "operations": { @@ -7626,7 +7986,7 @@ } } }, - "revision": "20220519", + "revision": "20220527", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -10572,6 +10932,21 @@ }, "type": "object" }, + "GoogleCloudApigeeV1KeyValueEntry": { + "description": "Key value map pair where the value represents the data associated with the corresponding key.", + "id": "GoogleCloudApigeeV1KeyValueEntry", + "properties": { + "name": { + "description": "Resource URI that can be used to identify the scope of the key value map entries.", + "type": "string" + }, + "value": { + "description": "Required. Data or payload that is being retrieved and associated with the unique key.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudApigeeV1KeyValueMap": { "description": "Collection of key/value string pairs.", "id": "GoogleCloudApigeeV1KeyValueMap", @@ -10960,6 +11335,24 @@ }, "type": "object" }, + "GoogleCloudApigeeV1ListKeyValueEntriesResponse": { + "description": "The request structure for listing Key value map keys and its corrresponding values.", + "id": "GoogleCloudApigeeV1ListKeyValueEntriesResponse", + "properties": { + "keyValueEntries": { + "description": "One or more key value map keys and values.", + "items": { + "$ref": "GoogleCloudApigeeV1KeyValueEntry" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token that can be sent as `next_page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudApigeeV1ListNatAddressesResponse": { "description": "Response for ListNatAddresses.", "id": "GoogleCloudApigeeV1ListNatAddressesResponse", diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index fc014723b10..917dcbde1b7 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -313,11 +313,23 @@ type OrganizationsApisDeploymentsService struct { func NewOrganizationsApisKeyvaluemapsService(s *Service) *OrganizationsApisKeyvaluemapsService { rs := &OrganizationsApisKeyvaluemapsService{s: s} + rs.Entries = NewOrganizationsApisKeyvaluemapsEntriesService(s) return rs } type OrganizationsApisKeyvaluemapsService struct { s *Service + + Entries *OrganizationsApisKeyvaluemapsEntriesService +} + +func NewOrganizationsApisKeyvaluemapsEntriesService(s *Service) *OrganizationsApisKeyvaluemapsEntriesService { + rs := &OrganizationsApisKeyvaluemapsEntriesService{s: s} + return rs +} + +type OrganizationsApisKeyvaluemapsEntriesService struct { + s *Service } func NewOrganizationsApisRevisionsService(s *Service) *OrganizationsApisRevisionsService { @@ -721,11 +733,23 @@ type OrganizationsEnvironmentsKeystoresAliasesService struct { func NewOrganizationsEnvironmentsKeyvaluemapsService(s *Service) *OrganizationsEnvironmentsKeyvaluemapsService { rs := &OrganizationsEnvironmentsKeyvaluemapsService{s: s} + rs.Entries = NewOrganizationsEnvironmentsKeyvaluemapsEntriesService(s) return rs } type OrganizationsEnvironmentsKeyvaluemapsService struct { s *Service + + Entries *OrganizationsEnvironmentsKeyvaluemapsEntriesService +} + +func NewOrganizationsEnvironmentsKeyvaluemapsEntriesService(s *Service) *OrganizationsEnvironmentsKeyvaluemapsEntriesService { + rs := &OrganizationsEnvironmentsKeyvaluemapsEntriesService{s: s} + return rs +} + +type OrganizationsEnvironmentsKeyvaluemapsEntriesService struct { + s *Service } func NewOrganizationsEnvironmentsOptimizedStatsService(s *Service) *OrganizationsEnvironmentsOptimizedStatsService { @@ -901,11 +925,23 @@ type OrganizationsInstancesNatAddressesService struct { func NewOrganizationsKeyvaluemapsService(s *Service) *OrganizationsKeyvaluemapsService { rs := &OrganizationsKeyvaluemapsService{s: s} + rs.Entries = NewOrganizationsKeyvaluemapsEntriesService(s) return rs } type OrganizationsKeyvaluemapsService struct { s *Service + + Entries *OrganizationsKeyvaluemapsEntriesService +} + +func NewOrganizationsKeyvaluemapsEntriesService(s *Service) *OrganizationsKeyvaluemapsEntriesService { + rs := &OrganizationsKeyvaluemapsEntriesService{s: s} + return rs +} + +type OrganizationsKeyvaluemapsEntriesService struct { + s *Service } func NewOrganizationsOperationsService(s *Service) *OrganizationsOperationsService { @@ -5314,6 +5350,44 @@ func (s *GoogleCloudApigeeV1KeyAliasReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudApigeeV1KeyValueEntry: Key value map pair where the value +// represents the data associated with the corresponding key. +type GoogleCloudApigeeV1KeyValueEntry struct { + // Name: Resource URI that can be used to identify the scope of the key + // value map entries. + Name string `json:"name,omitempty"` + + // Value: Required. Data or payload that is being retrieved and + // associated with the unique key. + Value string `json:"value,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 + // 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. "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 *GoogleCloudApigeeV1KeyValueEntry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1KeyValueEntry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudApigeeV1KeyValueMap: Collection of key/value string pairs. type GoogleCloudApigeeV1KeyValueMap struct { // Encrypted: Optional. Flag that specifies whether entry values will be @@ -6162,6 +6236,45 @@ func (s *GoogleCloudApigeeV1ListInstancesResponse) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudApigeeV1ListKeyValueEntriesResponse: The request structure +// for listing Key value map keys and its corrresponding values. +type GoogleCloudApigeeV1ListKeyValueEntriesResponse struct { + // KeyValueEntries: One or more key value map keys and values. + KeyValueEntries []*GoogleCloudApigeeV1KeyValueEntry `json:"keyValueEntries,omitempty"` + + // NextPageToken: Token that can be sent as `next_page_token` to + // retrieve the next page. If this field is omitted, there are no + // subsequent pages. + 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. "KeyValueEntries") 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. "KeyValueEntries") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudApigeeV1ListKeyValueEntriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudApigeeV1ListKeyValueEntriesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudApigeeV1ListNatAddressesResponse: Response for // ListNatAddresses. type GoogleCloudApigeeV1ListNatAddressesResponse struct { @@ -16607,9 +16720,158 @@ func (c *OrganizationsApisKeyvaluemapsDeleteCall) Do(opts ...googleapi.CallOptio } -// method id "apigee.organizations.apis.revisions.delete": +// method id "apigee.organizations.apis.keyvaluemaps.entries.create": -type OrganizationsApisRevisionsDeleteCall struct { +type OrganizationsApisKeyvaluemapsEntriesCreateCall struct { + s *Service + parent string + googlecloudapigeev1keyvalueentry *GoogleCloudApigeeV1KeyValueEntry + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates key value entries in a org, env or apis scoped key +// value map. +// +// - parent: Scope as indicated by the URI in which to create the key +// value map entry. Use one of the following formats 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 *OrganizationsApisKeyvaluemapsEntriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsEntriesCreateCall { + 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 *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 *OrganizationsApisKeyvaluemapsEntriesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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()) + 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 += "?" + 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.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) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1KeyValueEntry{ + ServerResponse: googleapi.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 key value entries in a org, env or apis scoped key value map.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps/{keyvaluemapsId}/entries", + // "httpMethod": "POST", + // "id": "apigee.organizations.apis.keyvaluemaps.entries.create", + // "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 formats in your request: `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/entries", + // "request": { + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" + // }, + // "response": { + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.apis.keyvaluemaps.entries.delete": + +type OrganizationsApisKeyvaluemapsEntriesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -16617,14 +16879,19 @@ type OrganizationsApisRevisionsDeleteCall struct { 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. +// Delete: Deletes a key value entry from an org, environment or apis +// scoped key value map. // -// - 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: Scope as indicated by the URI in which to delete the key +// value map entry. Use one of the following formats 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 return c } @@ -16632,7 +16899,7 @@ func (r *OrganizationsApisRevisionsService) Delete(name string) *OrganizationsAp // 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 *OrganizationsApisKeyvaluemapsEntriesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsEntriesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16640,21 +16907,21 @@ func (c *OrganizationsApisRevisionsDeleteCall) 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 *OrganizationsApisRevisionsDeleteCall) Context(ctx context.Context) *OrganizationsApisRevisionsDeleteCall { +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 *OrganizationsApisRevisionsDeleteCall) Header() http.Header { +func (c *OrganizationsApisKeyvaluemapsEntriesDeleteCall) 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 *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_ { @@ -16677,15 +16944,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.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 *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 *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 *OrganizationsApisKeyvaluemapsEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueEntry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16704,7 +16970,7 @@ func (c *OrganizationsApisRevisionsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ApiProxyRevision{ + ret := &GoogleCloudApigeeV1KeyValueEntry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16716,25 +16982,25 @@ 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}", + // "description": "Deletes a key value entry from an org, environment or apis scoped key value map.", + // "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", // "httpMethod": "DELETE", - // "id": "apigee.organizations.apis.revisions.delete", + // "id": "apigee.organizations.apis.keyvaluemaps.entries.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. API proxy revision in the following format: `organizations/{org}/apis/{api}/revisions/{rev}`", + // "description": "Required. Scope as indicated by the URI in which to delete the key value map entry. Use one of the following formats 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/[^/]+/apis/[^/]+/revisions/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ApiProxyRevision" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16743,9 +17009,9 @@ func (c *OrganizationsApisRevisionsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.apis.revisions.get": +// method id "apigee.organizations.apis.keyvaluemaps.entries.get": -type OrganizationsApisRevisionsGetCall struct { +type OrganizationsApisKeyvaluemapsEntriesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -16754,34 +17020,27 @@ 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). +// Get: Get the Key value entry value for org, env or apis scoped Key +// value map. // -// - 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: Scope as indicated by the URI in which to fetch the key value +// map entry/value. Use one of the following formats 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 } -// 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 *OrganizationsApisKeyvaluemapsEntriesGetCall) Fields(s ...googleapi.Field) *OrganizationsApisKeyvaluemapsEntriesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16791,7 +17050,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 *OrganizationsApisKeyvaluemapsEntriesGetCall) IfNoneMatch(entityTag string) *OrganizationsApisKeyvaluemapsEntriesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -16799,21 +17058,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 *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 *OrganizationsApisRevisionsGetCall) Header() http.Header { +func (c *OrganizationsApisKeyvaluemapsEntriesGetCall) 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 *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_ { @@ -16839,14 +17098,14 @@ 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 +// 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 *OrganizationsApisRevisionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, 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 { @@ -16865,7 +17124,7 @@ func (c *OrganizationsApisRevisionsGetCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleApiHttpBody{ + ret := &GoogleCloudApigeeV1KeyValueEntry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16877,30 +17136,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": "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.revisions.get", + // "id": "apigee.organizations.apis.keyvaluemaps.entries.get", // "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. Scope as indicated by the URI in which to fetch the key value map entry/value. Use one of the following formats 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/[^/]+/apis/[^/]+/revisions/[^/]+$", + // "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleApiHttpBody" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16909,84 +17163,269 @@ func (c *OrganizationsApisRevisionsGetCall) Do(opts ...googleapi.CallOption) (*G } -// method id "apigee.organizations.apis.revisions.updateApiProxyRevision": +// method id "apigee.organizations.apis.keyvaluemaps.entries.list": -type OrganizationsApisRevisionsUpdateApiProxyRevisionCall struct { - s *Service - name string - googleapihttpbody *GoogleApiHttpBody - 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 } -// 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`. +// List: Lists key value entries for key values maps scoped to an +// organization, environment, or API proxy. // -// - 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.googleapihttpbody = googleapihttpbody +// - parent: Scope as indicated by the URI in which to list key value +// maps. Use one of the following formats 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 } -// 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)) +// 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, a key +// value entry returned from a previous call that can use 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 *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Fields(s ...googleapi.Field) *OrganizationsApisRevisionsUpdateApiProxyRevisionCall { +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 *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Context(ctx context.Context) *OrganizationsApisRevisionsUpdateApiProxyRevisionCall { +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 *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Header() http.Header { +func (c *OrganizationsApisKeyvaluemapsEntriesListCall) 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 *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 - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } - reqHeaders.Set("Content-Type", "application/json") + 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.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 { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1ListKeyValueEntriesResponse{ + ServerResponse: googleapi.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 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": [ + // "parent" + // ], + // "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, a key value entry returned from a previous call that can use 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 formats in your request: `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/apis/[^/]+/keyvaluemaps/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/entries", + // "response": { + // "$ref": "GoogleCloudApigeeV1ListKeyValueEntriesResponse" + // }, + // "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 *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": + +type OrganizationsApisRevisionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + 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. +// +// - 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 +} + +// 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 { + 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 *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 *OrganizationsApisRevisionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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()) + 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("DELETE", urls, body) if err != nil { return nil, err } @@ -16997,7 +17436,7 @@ func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.apis.revisions.updateApiProxyRevision" call. +// 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 @@ -17005,7 +17444,327 @@ func (c *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) doRequest(alt str // 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 *OrganizationsApisRevisionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ApiProxyRevision, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1ApiProxyRevision{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an 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. API proxy revision in the following format: `organizations/{org}/apis/{api}/revisions/{rev}`", + // "location": "path", + // "pattern": "^organizations/[^/]+/apis/[^/]+/revisions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudApigeeV1ApiProxyRevision" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.apis.revisions.get": + +type OrganizationsApisRevisionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + 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). +// +// - 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 +} + +// 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 { + 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 *OrganizationsApisRevisionsGetCall) IfNoneMatch(entityTag string) *OrganizationsApisRevisionsGetCall { + 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 *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 *OrganizationsApisRevisionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + 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.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 { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleApiHttpBody{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets an 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.apis.revisions.get", + // "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}`", + // "location": "path", + // "pattern": "^organizations/[^/]+/apis/[^/]+/revisions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleApiHttpBody" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.apis.revisions.updateApiProxyRevision": + +type OrganizationsApisRevisionsUpdateApiProxyRevisionCall struct { + s *Service + name string + googleapihttpbody *GoogleApiHttpBody + urlParams_ gensupport.URLParams + 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`. +// +// - 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.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 { + 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 *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 *OrganizationsApisRevisionsUpdateApiProxyRevisionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + 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 + } + 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) + 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.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 { @@ -34859,217 +35618,95 @@ func (c *OrganizationsEnvironmentsKeyvaluemapsDeleteCall) Do(opts ...googleapi.C } -// method id "apigee.organizations.environments.optimizedStats.get": +// method id "apigee.organizations.environments.keyvaluemaps.entries.create": -type OrganizationsEnvironmentsOptimizedStatsGetCall struct { - s *Service - name 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 } -// Get: Similar to GetStats except that the response is less verbose. +// Create: Creates key value entries in a org, env or apis scoped key +// value map. // -// - 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 -} - -// 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) +// - parent: Scope as indicated by the URI in which to create the key +// value map entry. Use one of the following formats 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 + 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 *OrganizationsEnvironmentsOptimizedStatsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsOptimizedStatsGetCall { +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 *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 *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 *OrganizationsEnvironmentsOptimizedStatsGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesCreateCall) 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 *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/{+name}") + 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 } 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.optimizedStats.get" call. -// Exactly one of *GoogleCloudApigeeV1OptimizedStats or error will be +// 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 *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 *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 { @@ -35088,7 +35725,7 @@ func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1OptimizedStats{ + ret := &GoogleCloudApigeeV1KeyValueEntry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35100,100 +35737,28 @@ 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": "Creates key value entries in a org, env or apis scoped key value map.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps/{keyvaluemapsId}/entries", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.keyvaluemaps.entries.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "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`", + // "parent": { + // "description": "Required. Scope as indicated by the URI in which to create the key value map entry. Use one of the following formats in your request: `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/optimizedStats/.*$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+$", // "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/{+name}", + // "path": "v1/{+parent}/entries", + // "request": { + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1OptimizedStats" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35202,35 +35767,37 @@ func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Do(opts ...googleapi.Ca } -// method id "apigee.organizations.environments.queries.create": +// method id "apigee.organizations.environments.keyvaluemaps.entries.delete": -type OrganizationsEnvironmentsQueriesCreateCall struct { - s *Service - parent string - googlecloudapigeev1query *GoogleCloudApigeeV1Query - 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 } -// 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. +// Delete: Deletes a key value entry from an org, environment or apis +// scoped key value map. // -// - 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 +// - name: Scope as indicated by the URI in which to delete the key +// value map entry. Use one of the following formats 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 return 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 *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35238,21 +35805,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 *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 *OrganizationsEnvironmentsQueriesCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesDeleteCall) 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 *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_ { @@ -35260,34 +35827,29 @@ 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) - 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/{+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.queries.create" call. -// Exactly one of *GoogleCloudApigeeV1AsyncQuery or error will be +// 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 *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 +// 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 *OrganizationsEnvironmentsQueriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQuery, 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 { @@ -35306,7 +35868,7 @@ func (c *OrganizationsEnvironmentsQueriesCreateCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1AsyncQuery{ + ret := &GoogleCloudApigeeV1KeyValueEntry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35318,28 +35880,25 @@ 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", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.queries.create", + // "description": "Deletes a key value entry from an org, environment or apis scoped key value map.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/keyvaluemaps/{keyvaluemapsId}/entries/{entriesId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.environments.keyvaluemaps.entries.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource name. Must be of the form `organizations/{org}/environments/{env}`.", + // "name": { + // "description": "Required. Scope as indicated by the URI in which to delete the key value map entry. Use one of the following formats 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/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/queries", - // "request": { - // "$ref": "GoogleCloudApigeeV1Query" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1AsyncQuery" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35348,9 +35907,9 @@ func (c *OrganizationsEnvironmentsQueriesCreateCall) Do(opts ...googleapi.CallOp } -// method id "apigee.organizations.environments.queries.get": +// method id "apigee.organizations.environments.keyvaluemaps.entries.get": -type OrganizationsEnvironmentsQueriesGetCall struct { +type OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -35359,14 +35918,19 @@ 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 the Key value entry value for org, env or apis scoped Key +// value map. // -// - 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: Scope as indicated by the URI in which to fetch the key value +// map entry/value. Use one of the following formats 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 } @@ -35374,7 +35938,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 *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35384,7 +35948,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 *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -35392,21 +35956,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 *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 *OrganizationsEnvironmentsQueriesGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesGetCall) 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 *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_ { @@ -35432,14 +35996,14 @@ 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.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 *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 +// 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 *OrganizationsEnvironmentsQueriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQuery, 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 { @@ -35458,7 +36022,7 @@ func (c *OrganizationsEnvironmentsQueriesGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1AsyncQuery{ + ret := &GoogleCloudApigeeV1KeyValueEntry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35470,25 +36034,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 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.queries.get", + // "id": "apigee.organizations.environments.keyvaluemaps.entries.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. Scope as indicated by the URI in which to fetch the key value map entry/value. Use one of the following formats 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/[^/]+/queries/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+/entries/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1AsyncQuery" + // "$ref": "GoogleCloudApigeeV1KeyValueEntry" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35497,36 +36061,53 @@ func (c *OrganizationsEnvironmentsQueriesGetCall) Do(opts ...googleapi.CallOptio } -// method id "apigee.organizations.environments.queries.getResult": +// method id "apigee.organizations.environments.keyvaluemaps.entries.list": -type OrganizationsEnvironmentsQueriesGetResultCall struct { +type OrganizationsEnvironmentsKeyvaluemapsEntriesListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string 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` +// List: Lists key value entries for key values maps scoped to an +// organization, environment, or API proxy. // -// - 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 +// - parent: Scope as indicated by the URI in which to list key value +// maps. Use one of the following formats 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, a key +// value entry returned from a previous call that can use 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 *OrganizationsEnvironmentsQueriesGetResultCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesGetResultCall { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35536,7 +36117,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 *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall { c.ifNoneMatch_ = entityTag return c } @@ -35544,21 +36125,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 *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 *OrganizationsEnvironmentsQueriesGetResultCall) Header() http.Header { +func (c *OrganizationsEnvironmentsKeyvaluemapsEntriesListCall) 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 *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_ { @@ -35571,7 +36152,7 @@ func (c *OrganizationsEnvironmentsQueriesGetResultCall) 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}/entries") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -35579,19 +36160,21 @@ func (c *OrganizationsEnvironmentsQueriesGetResultCall) 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.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 *OrganizationsEnvironmentsQueriesGetResultCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, 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 { @@ -35610,7 +36193,7 @@ func (c *OrganizationsEnvironmentsQueriesGetResultCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleApiHttpBody{ + ret := &GoogleCloudApigeeV1ListKeyValueEntriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35622,25 +36205,36 @@ 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": "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.queries.getResult", + // "id": "apigee.organizations.environments.keyvaluemaps.entries.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the asynchronous query result to get. Must be of the form `organizations/{org}/environments/{env}/queries/{queryId}/result`.", + // "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, a key value entry returned from a previous call that can use 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 formats in your request: `organizations/{organization}/apis/{api}/keyvaluemaps/{keyvaluemap}`. `organizations/{organization}/environments/{environment}/keyvaluemaps/{keyvaluemap}` `organizations/{organization}/keyvaluemaps/{keyvaluemap}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/queries/[^/]+/result$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/keyvaluemaps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/entries", // "response": { - // "$ref": "GoogleApiHttpBody" + // "$ref": "GoogleCloudApigeeV1ListKeyValueEntriesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35649,9 +36243,30 @@ func (c *OrganizationsEnvironmentsQueriesGetResultCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.environments.queries.getResulturl": +// 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 OrganizationsEnvironmentsQueriesGetResulturlCall struct { +// method id "apigee.organizations.environments.optimizedStats.get": + +type OrganizationsEnvironmentsOptimizedStatsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -35660,219 +36275,140 @@ 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. +// Get: Similar to GetStats except that the response is less verbose. // -// - 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: 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 } -// 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 { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// 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 } -// 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 *OrganizationsEnvironmentsQueriesGetResulturlCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsQueriesGetResulturlCall { - c.ifNoneMatch_ = entityTag +// 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 } -// Context sets the context 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 { - c.ctx_ = ctx +// 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 } -// 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 { - 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 *OrganizationsEnvironmentsOptimizedStatsGetCall) Limit(limit string) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("limit", limit) + return c } -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_ { - 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) +// 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 } -// 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 { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudApigeeV1GetAsyncQueryResultUrlResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - 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", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.queries.getResulturl", - // "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`.", - // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/queries/[^/]+/resulturl$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "GoogleCloudApigeeV1GetAsyncQueryResultUrlResponse" - // }, - // "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 *OrganizationsEnvironmentsOptimizedStatsGetCall) Realtime(realtime bool) *OrganizationsEnvironmentsOptimizedStatsGetCall { + c.urlParams_.Set("realtime", fmt.Sprint(realtime)) + return c } -// method id "apigee.organizations.environments.queries.list": +// 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 +} -type OrganizationsEnvironmentsQueriesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 } -// List: Return a list of Asynchronous Queries -// -// - 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 +// 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 } -// 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) +// 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 } -// 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) +// 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 } -// 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) +// 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 } -// 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) +// 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 } -// 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) +// 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 } -// 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) +// 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 *OrganizationsEnvironmentsQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesListCall { +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsOptimizedStatsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35882,7 +36418,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 *OrganizationsEnvironmentsOptimizedStatsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsOptimizedStatsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -35890,21 +36426,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 *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 *OrganizationsEnvironmentsQueriesListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsOptimizedStatsGetCall) 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 *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_ { @@ -35917,7 +36453,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/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -35925,21 +36461,20 @@ func (c *OrganizationsEnvironmentsQueriesListCall) 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.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 +// 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 *OrganizationsEnvironmentsQueriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListAsyncQueriesResponse, error) { +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 { @@ -35958,7 +36493,7 @@ func (c *OrganizationsEnvironmentsQueriesListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListAsyncQueriesResponse{ + ret := &GoogleCloudApigeeV1OptimizedStats{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35970,55 +36505,100 @@ 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": "Similar to GetStats except that the response is less verbose.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/optimizedStats/{optimizedStatsId}", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.queries.list", + // "id": "apigee.organizations.environments.optimizedStats.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "dataset": { - // "description": "Filter response list by dataset. Example: `api`, `mint`", + // "accuracy": { + // "description": "No longer used by Apigee. Supported for backwards compatibility.", // "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'.", + // "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" // }, - // "inclQueriesWithoutReport": { - // "description": "Flag to include asynchronous queries that don't have a report denifition.", + // "filter": { + // "description": "Filter that enables you to drill-down on specific dimension values.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The parent resource name. Must be of the form `organizations/{org}/environments/{env}`.", + // "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" // }, - // "status": { - // "description": "Filter response list by asynchronous query status.", + // "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" // }, - // "submittedBy": { - // "description": "Filter response list by user who submitted queries.", + // "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" // }, - // "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'.", + // "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}/queries", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListAsyncQueriesResponse" + // "$ref": "GoogleCloudApigeeV1OptimizedStats" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36027,33 +36607,35 @@ func (c *OrganizationsEnvironmentsQueriesListCall) Do(opts ...googleapi.CallOpti } -// method id "apigee.organizations.environments.references.create": +// method id "apigee.organizations.environments.queries.create": -type OrganizationsEnvironmentsReferencesCreateCall struct { - s *Service - parent string - googlecloudapigeev1reference *GoogleCloudApigeeV1Reference - 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 } -// Create: Creates a Reference in the specified environment. +// 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. // -// - parent: The parent environment name under which the Reference will -// be created. Must be of the form +// - parent: The parent resource name. 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)} +func (r *OrganizationsEnvironmentsQueriesService) Create(parent string, googlecloudapigeev1query *GoogleCloudApigeeV1Query) *OrganizationsEnvironmentsQueriesCreateCall { + c := &OrganizationsEnvironmentsQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudapigeev1reference = googlecloudapigeev1reference + 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 *OrganizationsEnvironmentsReferencesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsReferencesCreateCall { +func (c *OrganizationsEnvironmentsQueriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36061,21 +36643,21 @@ func (c *OrganizationsEnvironmentsReferencesCreateCall) 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 *OrganizationsEnvironmentsReferencesCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsReferencesCreateCall { +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 *OrganizationsEnvironmentsReferencesCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsQueriesCreateCall) 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 *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_ { @@ -36083,14 +36665,14 @@ func (c *OrganizationsEnvironmentsReferencesCreateCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1reference) + 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/{+parent}/references") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/queries") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -36103,14 +36685,14 @@ 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 +// 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 *GoogleCloudApigeeV1Reference.ServerResponse.Header or (if a +// 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 *OrganizationsEnvironmentsReferencesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Reference, 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 { @@ -36129,7 +36711,7 @@ func (c *OrganizationsEnvironmentsReferencesCreateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Reference{ + ret := &GoogleCloudApigeeV1AsyncQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36141,28 +36723,28 @@ 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", + // "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.references.create", + // "id": "apigee.organizations.environments.queries.create", // "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. 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}/references", + // "path": "v1/{+parent}/queries", // "request": { - // "$ref": "GoogleCloudApigeeV1Reference" + // "$ref": "GoogleCloudApigeeV1Query" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Reference" + // "$ref": "GoogleCloudApigeeV1AsyncQuery" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36171,23 +36753,25 @@ func (c *OrganizationsEnvironmentsReferencesCreateCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.environments.references.delete": +// method id "apigee.organizations.environments.queries.get": -type OrganizationsEnvironmentsReferencesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsQueriesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Reference from an environment. Returns the deleted -// Reference resource. +// 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: 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 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 } @@ -36195,41 +36779,54 @@ func (r *OrganizationsEnvironmentsReferencesService) Delete(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 *OrganizationsEnvironmentsReferencesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsReferencesDeleteCall { +func (c *OrganizationsEnvironmentsQueriesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesGetCall { 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 *OrganizationsEnvironmentsQueriesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsQueriesGetCall { + 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 *OrganizationsEnvironmentsReferencesDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsReferencesDeleteCall { +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 *OrganizationsEnvironmentsReferencesDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsQueriesGetCall) 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 *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_ { 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 } @@ -36240,14 +36837,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.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 *GoogleCloudApigeeV1Reference.ServerResponse.Header or (if a +// 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 *OrganizationsEnvironmentsReferencesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Reference, 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 { @@ -36266,7 +36863,7 @@ func (c *OrganizationsEnvironmentsReferencesDeleteCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Reference{ + ret := &GoogleCloudApigeeV1AsyncQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36278,25 +36875,25 @@ 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": "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.queries.get", // "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 asynchronous query to get. Must be of the form `organizations/{org}/environments/{env}/queries/{queryId}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/references/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/queries/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Reference" + // "$ref": "GoogleCloudApigeeV1AsyncQuery" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36305,9 +36902,9 @@ func (c *OrganizationsEnvironmentsReferencesDeleteCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.environments.references.get": +// method id "apigee.organizations.environments.queries.getResult": -type OrganizationsEnvironmentsReferencesGetCall struct { +type OrganizationsEnvironmentsQueriesGetResultCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -36316,12 +36913,17 @@ type OrganizationsEnvironmentsReferencesGetCall struct { header_ http.Header } -// Get: Gets a Reference resource. +// 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: 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 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 } @@ -36329,7 +36931,7 @@ 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 *OrganizationsEnvironmentsQueriesGetResultCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesGetResultCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36339,7 +36941,7 @@ func (c *OrganizationsEnvironmentsReferencesGetCall) 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 *OrganizationsEnvironmentsReferencesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsReferencesGetCall { +func (c *OrganizationsEnvironmentsQueriesGetResultCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsQueriesGetResultCall { c.ifNoneMatch_ = entityTag return c } @@ -36347,21 +36949,21 @@ func (c *OrganizationsEnvironmentsReferencesGetCall) 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 *OrganizationsEnvironmentsReferencesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsReferencesGetCall { +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 *OrganizationsEnvironmentsReferencesGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsQueriesGetResultCall) 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 *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_ { @@ -36387,14 +36989,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.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 *OrganizationsEnvironmentsReferencesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Reference, 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 { @@ -36413,7 +37015,7 @@ func (c *OrganizationsEnvironmentsReferencesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Reference{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36425,25 +37027,25 @@ func (c *OrganizationsEnvironmentsReferencesGetCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Gets a Reference resource.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/references/{referencesId}", + // "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.references.get", + // "id": "apigee.organizations.environments.queries.getResult", // "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 asynchronous query result to get. Must be of the form `organizations/{org}/environments/{env}/queries/{queryId}/result`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/references/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/queries/[^/]+/result$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Reference" + // "$ref": "GoogleApiHttpBody" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36452,73 +37054,83 @@ func (c *OrganizationsEnvironmentsReferencesGetCall) Do(opts ...googleapi.CallOp } -// method id "apigee.organizations.environments.references.update": +// method id "apigee.organizations.environments.queries.getResulturl": -type OrganizationsEnvironmentsReferencesUpdateCall struct { - s *Service - name string - googlecloudapigeev1reference *GoogleCloudApigeeV1Reference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsQueriesGetResulturlCall 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. +// 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: 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: 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 - 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 *OrganizationsEnvironmentsReferencesUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsReferencesUpdateCall { +func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsQueriesGetResulturlCall { 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 *OrganizationsEnvironmentsQueriesGetResulturlCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsQueriesGetResulturlCall { + 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 *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 *OrganizationsEnvironmentsReferencesUpdateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsQueriesGetResulturlCall) 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 *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_ { 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 } @@ -36529,14 +37141,16 @@ 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 -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsEnvironmentsReferencesUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Reference, 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 { @@ -36555,7 +37169,7 @@ func (c *OrganizationsEnvironmentsReferencesUpdateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Reference{ + ret := &GoogleCloudApigeeV1GetAsyncQueryResultUrlResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36567,28 +37181,25 @@ 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": "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.queries.getResulturl", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the Reference to update. Must be of the form `organizations/{org}/environments/{env}/references/{ref}`.", + // "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/[^/]+/references/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/queries/[^/]+/resulturl$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1Reference" - // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Reference" + // "$ref": "GoogleCloudApigeeV1GetAsyncQueryResultUrlResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36597,90 +37208,123 @@ func (c *OrganizationsEnvironmentsReferencesUpdateCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.environments.resourcefiles.create": +// method id "apigee.organizations.environments.queries.list": -type OrganizationsEnvironmentsResourcefilesCreateCall struct { - s *Service - parent string - googleapihttpbody *GoogleApiHttpBody - 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 } -// 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). +// List: Return a list of Asynchronous Queries // -// - parent: Name of the environment in which to create the resource -// file in the following format: +// - parent: The parent resource name. 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 *OrganizationsEnvironmentsQueriesService) List(parent string) *OrganizationsEnvironmentsQueriesListCall { + c := &OrganizationsEnvironmentsQueriesListCall{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) +// 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 } -// 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_) +// 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 *OrganizationsEnvironmentsResourcefilesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesCreateCall { +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 *OrganizationsEnvironmentsResourcefilesCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesCreateCall { +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 *OrganizationsEnvironmentsResourcefilesCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsQueriesListCall) 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 *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()) - 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}/resourcefiles") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/queries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -36691,14 +37335,16 @@ 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 -// 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 -// because http.StatusNotModified was returned. -func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ResourceFile, 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 { @@ -36717,7 +37363,7 @@ func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ResourceFile{ + ret := &GoogleCloudApigeeV1ListAsyncQueriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36729,38 +37375,55 @@ 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", - // "httpMethod": "POST", - // "id": "apigee.organizations.environments.resourcefiles.create", + // "description": "Return a list of Asynchronous Queries", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/queries", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.queries.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the resource file. Must match the regular expression: [a-zA-Z0-9:/\\\\!@#$%^\u0026{}\\[\\]()+\\-=,.~'` ]{1,255}", + // "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. Name of the environment in which to create the resource file in the following format: `organizations/{org}/environments/{env}`.", + // "description": "Required. The parent resource name. 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 }}", + // "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}/resourcefiles", - // "request": { - // "$ref": "GoogleApiHttpBody" - // }, + // "path": "v1/{+parent}/queries", // "response": { - // "$ref": "GoogleCloudApigeeV1ResourceFile" + // "$ref": "GoogleCloudApigeeV1ListAsyncQueriesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36769,39 +37432,33 @@ func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.resourcefiles.delete": +// method id "apigee.organizations.environments.references.create": -type OrganizationsEnvironmentsResourcefilesDeleteCall struct { - s *Service - parent string - type_ string - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsReferencesCreateCall struct { + s *Service + parent string + googlecloudapigeev1reference *GoogleCloudApigeeV1Reference + 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). +// Create: Creates a Reference in the specified environment. // -// - 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: +// - parent: The parent environment name under which the Reference will +// be created. Must be of the form // `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)} +func (r *OrganizationsEnvironmentsReferencesService) Create(parent string, googlecloudapigeev1reference *GoogleCloudApigeeV1Reference) *OrganizationsEnvironmentsReferencesCreateCall { + c := &OrganizationsEnvironmentsReferencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.type_ = type_ - 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 *OrganizationsEnvironmentsResourcefilesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesDeleteCall { +func (c *OrganizationsEnvironmentsReferencesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsReferencesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36809,21 +37466,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 *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 *OrganizationsEnvironmentsResourcefilesDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsReferencesCreateCall) 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 *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_ { @@ -36831,31 +37488,34 @@ func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) doRequest(alt string) } 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 + } + 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/{+parent}/references") 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{ "parent": c.parent, - "type": c.type_, - "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.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 *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 +// 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 *OrganizationsEnvironmentsResourcefilesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ResourceFile, 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 { @@ -36874,7 +37534,7 @@ func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ResourceFile{ + ret := &GoogleCloudApigeeV1Reference{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36886,39 +37546,28 @@ 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}", - // "httpMethod": "DELETE", - // "id": "apigee.organizations.environments.resourcefiles.delete", + // "description": "Creates a Reference in the specified environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/references", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.references.create", // "parameterOrder": [ - // "parent", - // "type", - // "name" + // "parent" // ], // "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}`.", + // "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/[^/]+$", // "required": true, // "type": "string" - // }, - // "type": { - // "description": "Required. Resource file type. {{ resource_file_type }}", - // "location": "path", - // "required": true, - // "type": "string" // } // }, - // "path": "v1/{+parent}/resourcefiles/{type}/{name}", + // "path": "v1/{+parent}/references", + // "request": { + // "$ref": "GoogleCloudApigeeV1Reference" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ResourceFile" + // "$ref": "GoogleCloudApigeeV1Reference" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36927,32 +37576,23 @@ func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.resourcefiles.get": +// method id "apigee.organizations.environments.references.delete": -type OrganizationsEnvironmentsResourcefilesGetCall struct { - s *Service - parent string - type_ string - 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 } -// 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). +// Delete: Deletes a Reference from an environment. Returns the deleted +// Reference 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 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 } @@ -36960,74 +37600,59 @@ 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 *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 *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 *OrganizationsEnvironmentsResourcefilesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesGetCall { +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 *OrganizationsEnvironmentsResourcefilesGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsReferencesDeleteCall) 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 *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/{+parent}/resourcefiles/{type}/{name}") + 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, - "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 +// 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 *OrganizationsEnvironmentsResourcefilesGetCall) 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 { @@ -37046,7 +37671,7 @@ func (c *OrganizationsEnvironmentsResourcefilesGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleApiHttpBody{ + ret := &GoogleCloudApigeeV1Reference{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37058,39 +37683,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}", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.resourcefiles.get", + // "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": [ - // "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 Reference to delete. Must be of the form `organizations/{org}/environments/{env}/references/{ref}`.", // "location": "path", + // "pattern": "^organizations/[^/]+/environments/[^/]+/references/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/resourcefiles/{type}/{name}", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleApiHttpBody" + // "$ref": "GoogleCloudApigeeV1Reference" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -37099,40 +37710,31 @@ func (c *OrganizationsEnvironmentsResourcefilesGetCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.environments.resourcefiles.list": +// method id "apigee.organizations.environments.references.get": -type OrganizationsEnvironmentsResourcefilesListCall struct { +type OrganizationsEnvironmentsReferencesGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string 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). +// Get: Gets a Reference resource. // -// - 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 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 return 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 *OrganizationsEnvironmentsReferencesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsReferencesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -37142,7 +37744,7 @@ func (c *OrganizationsEnvironmentsResourcefilesListCall) 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 *OrganizationsEnvironmentsResourcefilesListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsResourcefilesListCall { +func (c *OrganizationsEnvironmentsReferencesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsReferencesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -37150,21 +37752,21 @@ func (c *OrganizationsEnvironmentsResourcefilesListCall) 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 *OrganizationsEnvironmentsResourcefilesListCall) Context(ctx context.Context) *OrganizationsEnvironmentsResourcefilesListCall { +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 *OrganizationsEnvironmentsResourcefilesListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsReferencesGetCall) 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 *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_ { @@ -37177,7 +37779,7 @@ func (c *OrganizationsEnvironmentsResourcefilesListCall) 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") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -37185,21 +37787,19 @@ func (c *OrganizationsEnvironmentsResourcefilesListCall) 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.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.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 *OrganizationsEnvironmentsReferencesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Reference, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37218,7 +37818,7 @@ func (c *OrganizationsEnvironmentsResourcefilesListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListEnvironmentResourcesResponse{ + ret := &GoogleCloudApigeeV1Reference{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37230,30 +37830,25 @@ 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", + // "description": "Gets a Reference resource.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/references/{referencesId}", // "httpMethod": "GET", - // "id": "apigee.organizations.environments.resourcefiles.list", + // "id": "apigee.organizations.environments.references.get", // "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 Reference to get. Must be of the form `organizations/{org}/environments/{env}/references/{ref}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/references/[^/]+$", // "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}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListEnvironmentResourcesResponse" + // "$ref": "GoogleCloudApigeeV1Reference" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -37262,106 +37857,91 @@ func (c *OrganizationsEnvironmentsResourcefilesListCall) Do(opts ...googleapi.Ca } -// method id "apigee.organizations.environments.resourcefiles.listEnvironmentResources": +// method id "apigee.organizations.environments.references.update": -type OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall struct { - s *Service - parent string - type_ string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsReferencesUpdateCall struct { + s *Service + name string + googlecloudapigeev1reference *GoogleCloudApigeeV1Reference + 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). +// 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 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 - c.type_ = type_ +// - 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 *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall { +func (c *OrganizationsEnvironmentsReferencesUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsReferencesUpdateCall { 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 *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 *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Header() http.Header { +func (c *OrganizationsEnvironmentsReferencesUpdateCall) 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 *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_ { 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/{+parent}/resourcefiles/{type}") + 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, - "type": c.type_, + "name": c.name, }) 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.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 +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +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 { @@ -37380,7 +37960,7 @@ func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Do( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListEnvironmentResourcesResponse{ + ret := &GoogleCloudApigeeV1Reference{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37392,32 +37972,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": "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", - // "type" + // "name" // ], // "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 }}", + // "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/[^/]+/references/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/resourcefiles/{type}", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudApigeeV1Reference" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1ListEnvironmentResourcesResponse" + // "$ref": "GoogleCloudApigeeV1Reference" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -37426,42 +38002,51 @@ func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Do( } -// method id "apigee.organizations.environments.resourcefiles.update": +// method id "apigee.organizations.environments.resourcefiles.create": -type OrganizationsEnvironmentsResourcefilesUpdateCall struct { +type OrganizationsEnvironmentsResourcefilesCreateCall struct { s *Service parent string - type_ string - name string googleapihttpbody *GoogleApiHttpBody urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Update: Updates a resource file. Specify the `Content-Type` as +// 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: 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: +// - parent: Name of the environment in which to create the resource +// file 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)} +func (r *OrganizationsEnvironmentsResourcefilesService) Create(parent string, googleapihttpbody *GoogleApiHttpBody) *OrganizationsEnvironmentsResourcefilesCreateCall { + c := &OrganizationsEnvironmentsResourcefilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.type_ = type_ - c.name = name 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 *OrganizationsEnvironmentsResourcefilesUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesUpdateCall { +func (c *OrganizationsEnvironmentsResourcefilesCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -37469,21 +38054,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 *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 *OrganizationsEnvironmentsResourcefilesUpdateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsResourcefilesCreateCall) 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 *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_ { @@ -37498,29 +38083,27 @@ func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) doRequest(alt string) reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/resourcefiles/{type}/{name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/resourcefiles") 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{ "parent": c.parent, - "type": c.type_, - "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "apigee.organizations.environments.resourcefiles.update" call. +// 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 *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) { +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 { @@ -37551,24 +38134,21 @@ 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": "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": [ - // "parent", - // "type", - // "name" + // "parent" // ], // "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, + // "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 the following format: `organizations/{org}/environments/{env}`.", + // "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/[^/]+$", // "required": true, @@ -37576,12 +38156,11 @@ func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) Do(opts ...googleapi. // }, // "type": { // "description": "Required. Resource file type. {{ resource_file_type }}", - // "location": "path", - // "required": true, + // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+parent}/resourcefiles/{type}/{name}", + // "path": "v1/{+parent}/resourcefiles", // "request": { // "$ref": "GoogleApiHttpBody" // }, @@ -37595,99 +38174,93 @@ func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.sharedflows.deployments.list": +// method id "apigee.organizations.environments.resourcefiles.delete": -type OrganizationsEnvironmentsSharedflowsDeploymentsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - 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 } -// List: Lists all deployments of a shared flow in an environment. +// 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: 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)} +// - 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_ + 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 *OrganizationsEnvironmentsResourcefilesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesDeleteCall { 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 *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Context(ctx context.Context) *OrganizationsEnvironmentsSharedflowsDeploymentsListCall { +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 *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsResourcefilesDeleteCall) 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 *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_ { 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}/deployments") + 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("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.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.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 *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 *OrganizationsEnvironmentsResourcefilesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ResourceFile, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37706,7 +38279,7 @@ func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListDeploymentsResponse{ + ret := &GoogleCloudApigeeV1ResourceFile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37718,25 +38291,39 @@ 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", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.sharedflows.deployments.list", + // "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. Name representing a shared flow in an environment in the following format: `organizations/{org}/environments/{env}/sharedflows/{sharedflow}`", + // "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/[^/]+/sharedflows/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/deployments", + // "path": "v1/{+parent}/resourcefiles/{type}/{name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListDeploymentsResponse" + // "$ref": "GoogleCloudApigeeV1ResourceFile" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -37745,115 +38332,107 @@ func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) Do(opts ...goo } -// method id "apigee.organizations.environments.sharedflows.revisions.deploy": +// method id "apigee.organizations.environments.resourcefiles.get": -type OrganizationsEnvironmentsSharedflowsRevisionsDeployCall 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 } -// 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}` +// 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: 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)} +// - 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 } -// 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 *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall { +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 *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Context(ctx context.Context) *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall { +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 *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Header() http.Header { +func (c *OrganizationsEnvironmentsResourcefilesGetCall) 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 *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}/deployments") + 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("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.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 +// 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 *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Deployment, 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 { @@ -37872,7 +38451,7 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Deployment{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37884,35 +38463,39 @@ 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": "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. Name of the shared flow revision to deploy in the following format: `organizations/{org}/environments/{env}/sharedflows/{sharedflow}/revisions/{rev}`", + // "description": "Required. ID of the resource file. Must match the regular expression: [a-zA-Z0-9:/\\\\!@#$%^\u0026{}\\[\\]()+\\-=,.~'` ]{1,255}", // "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.", - // "location": "query", - // "type": "boolean" + // "parent": { + // "description": "Required. Name of the environment in the following format: `organizations/{org}/environments/{env}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", + // "required": true, + // "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", + // "type": { + // "description": "Required. Resource file type. {{ resource_file_type }}", + // "location": "path", + // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}/deployments", + // "path": "v1/{+parent}/resourcefiles/{type}/{name}", // "response": { - // "$ref": "GoogleCloudApigeeV1Deployment" + // "$ref": "GoogleApiHttpBody" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -37921,34 +38504,40 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Do(opts ...goo } -// method id "apigee.organizations.environments.sharedflows.revisions.getDeployments": +// method id "apigee.organizations.environments.resourcefiles.list": -type OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall struct { +type OrganizationsEnvironmentsResourcefilesListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetDeployments: Gets the deployment of a shared flow revision and -// actual state reported by runtime pods. -// -// - 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 +// 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). +// +// - 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 *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall { +func (c *OrganizationsEnvironmentsResourcefilesListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -37958,7 +38547,7 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Fields // getting updates only after the object has changed 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 { +func (c *OrganizationsEnvironmentsResourcefilesListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsResourcefilesListCall { c.ifNoneMatch_ = entityTag return c } @@ -37966,21 +38555,21 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) IfNone // Context sets the context 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 *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 *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Header() http.Header { +func (c *OrganizationsEnvironmentsResourcefilesListCall) 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 *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_ { @@ -37993,7 +38582,7 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) doRequ 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}/resourcefiles") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -38001,19 +38590,21 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) doRequ } 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.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) { +// 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 { @@ -38032,7 +38623,7 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Deployment{ + ret := &GoogleCloudApigeeV1ListEnvironmentResourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38044,25 +38635,30 @@ 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", + // "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.sharedflows.revisions.getDeployments", + // "id": "apigee.organizations.environments.resourcefiles.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name representing a shared flow in an environment in the following format: `organizations/{org}/environments/{env}/sharedflows/{sharedflow}/revisions/{rev}`", + // "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/[^/]+/sharedflows/[^/]+/revisions/[^/]+$", + // "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}/deployments", + // "path": "v1/{+parent}/resourcefiles", // "response": { - // "$ref": "GoogleCloudApigeeV1Deployment" + // "$ref": "GoogleCloudApigeeV1ListEnvironmentResourcesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -38071,91 +38667,106 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Do(opt } -// method id "apigee.organizations.environments.sharedflows.revisions.undeploy": +// method id "apigee.organizations.environments.resourcefiles.listEnvironmentResources": -type OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall struct { + s *Service + parent string + type_ string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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}` +// 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). // -// - 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: 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 + 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 *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall { +func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall { 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 *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Context(ctx context.Context) *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall { +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 *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Header() http.Header { +func (c *OrganizationsEnvironmentsResourcefilesListEnvironmentResourcesCall) 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 *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_ { 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}/resourcefiles/{type}") 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_, }) 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 -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// 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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38174,7 +38785,7 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudApigeeV1ListEnvironmentResourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38186,25 +38797,32 @@ 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": "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", // "parameterOrder": [ - // "name" + // "parent", + // "type" // ], // "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. 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 }}", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/sharedflows/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}/deployments", + // "path": "v1/{+parent}/resourcefiles/{type}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudApigeeV1ListEnvironmentResourcesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -38213,220 +38831,101 @@ func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Do(opts ...g } -// method id "apigee.organizations.environments.stats.get": +// method id "apigee.organizations.environments.resourcefiles.update": -type OrganizationsEnvironmentsStatsGetCall 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: 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. +// 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}/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)} +// - 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 *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) + 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 *OrganizationsEnvironmentsStatsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsStatsGetCall { +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 *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 *OrganizationsEnvironmentsStatsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsStatsGetCall { +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 *OrganizationsEnvironmentsStatsGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsResourcefilesUpdateCall) 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 *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.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 +// 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 // because http.StatusNotModified was returned. -func (c *OrganizationsEnvironmentsStatsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Stats, error) { +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 { @@ -38445,7 +38944,7 @@ func (c *OrganizationsEnvironmentsStatsGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Stats{ + ret := &GoogleCloudApigeeV1ResourceFile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38457,100 +38956,42 @@ 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}", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.stats.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}/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. ID of the resource file to update. Must match the regular expression: [a-zA-Z0-9:/\\\\!@#$%^\u0026{}\\[\\]()+\\-=,.~'` ]{1,255}", // "location": "path", - // "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", + // "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 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": { + // "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": "GoogleCloudApigeeV1Stats" + // "$ref": "GoogleCloudApigeeV1ResourceFile" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -38559,79 +39000,79 @@ func (c *OrganizationsEnvironmentsStatsGetCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.environments.targetservers.create": +// method id "apigee.organizations.environments.sharedflows.deployments.list": -type OrganizationsEnvironmentsTargetserversCreateCall struct { - s *Service - parent string - googlecloudapigeev1targetserver *GoogleCloudApigeeV1TargetServer - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsSharedflowsDeploymentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a TargetServer in the specified environment. +// List: Lists all deployments of a shared flow in an environment. // -// - 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)} +// - 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.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) return 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 *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 *OrganizationsEnvironmentsTargetserversCreateCall) Context(ctx context.Context) *OrganizationsEnvironmentsTargetserversCreateCall { +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 *OrganizationsEnvironmentsTargetserversCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsSharedflowsDeploymentsListCall) 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 *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.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/{+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 } @@ -38642,14 +39083,16 @@ func (c *OrganizationsEnvironmentsTargetserversCreateCall) doRequest(alt string) 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 -// because http.StatusNotModified was returned. -func (c *OrganizationsEnvironmentsTargetserversCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TargetServer, 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 { @@ -38668,7 +39111,7 @@ func (c *OrganizationsEnvironmentsTargetserversCreateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1TargetServer{ + ret := &GoogleCloudApigeeV1ListDeploymentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38680,33 +39123,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": "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": { - // "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 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}/targetservers", - // "request": { - // "$ref": "GoogleCloudApigeeV1TargetServer" - // }, + // "path": "v1/{+parent}/deployments", // "response": { - // "$ref": "GoogleCloudApigeeV1TargetServer" + // "$ref": "GoogleCloudApigeeV1ListDeploymentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -38715,9 +39150,9 @@ func (c *OrganizationsEnvironmentsTargetserversCreateCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.targetservers.delete": +// method id "apigee.organizations.environments.sharedflows.revisions.deploy": -type OrganizationsEnvironmentsTargetserversDeleteCall struct { +type OrganizationsEnvironmentsSharedflowsRevisionsDeployCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -38725,22 +39160,53 @@ type OrganizationsEnvironmentsTargetserversDeleteCall struct { header_ http.Header } -// Delete: Deletes a TargetServer from an environment. Returns the -// deleted TargetServer 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 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 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 *OrganizationsEnvironmentsTargetserversDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversDeleteCall { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38748,21 +39214,21 @@ func (c *OrganizationsEnvironmentsTargetserversDeleteCall) 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 *OrganizationsEnvironmentsTargetserversDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsTargetserversDeleteCall { +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 *OrganizationsEnvironmentsTargetserversDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsDeployCall) 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 *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_ { @@ -38772,9 +39238,9 @@ func (c *OrganizationsEnvironmentsTargetserversDeleteCall) 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 } @@ -38785,14 +39251,14 @@ 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 +// 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 *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 +// 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 *OrganizationsEnvironmentsTargetserversDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TargetServer, 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 { @@ -38811,7 +39277,7 @@ func (c *OrganizationsEnvironmentsTargetserversDeleteCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1TargetServer{ + ret := &GoogleCloudApigeeV1Deployment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38823,25 +39289,35 @@ 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": "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 TargetServer to delete. Must be of the form `organizations/{org}/environments/{env}/targetservers/{target_server_id}`.", + // "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/[^/]+/targetservers/[^/]+$", + // "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": "GoogleCloudApigeeV1TargetServer" + // "$ref": "GoogleCloudApigeeV1Deployment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -38850,9 +39326,9 @@ func (c *OrganizationsEnvironmentsTargetserversDeleteCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.targetservers.get": +// method id "apigee.organizations.environments.sharedflows.revisions.getDeployments": -type OrganizationsEnvironmentsTargetserversGetCall struct { +type OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -38861,13 +39337,15 @@ type OrganizationsEnvironmentsTargetserversGetCall struct { header_ http.Header } -// Get: Gets a TargetServer resource. +// GetDeployments: Gets the deployment of a shared flow revision and +// actual state reported by runtime pods. // -// - 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)} +// - 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 } @@ -38875,7 +39353,7 @@ func (r *OrganizationsEnvironmentsTargetserversService) Get(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 *OrganizationsEnvironmentsTargetserversGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversGetCall { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38885,7 +39363,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 *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall { c.ifNoneMatch_ = entityTag return c } @@ -38893,21 +39371,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 *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 *OrganizationsEnvironmentsTargetserversGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsGetDeploymentsCall) 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 *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_ { @@ -38920,7 +39398,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/{+name}/deployments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -38933,14 +39411,14 @@ func (c *OrganizationsEnvironmentsTargetserversGetCall) doRequest(alt string) (* 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 +// 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 *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 +// 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 *OrganizationsEnvironmentsTargetserversGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TargetServer, error) { +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 { @@ -38959,7 +39437,7 @@ func (c *OrganizationsEnvironmentsTargetserversGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1TargetServer{ + ret := &GoogleCloudApigeeV1Deployment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38971,25 +39449,25 @@ func (c *OrganizationsEnvironmentsTargetserversGetCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Gets a TargetServer resource.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/targetservers/{targetserversId}", + // "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.targetservers.get", + // "id": "apigee.organizations.environments.sharedflows.revisions.getDeployments", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the TargetServer to get. Must be of the form `organizations/{org}/environments/{env}/targetservers/{target_server_id}`.", + // "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/[^/]+/targetservers/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/sharedflows/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}/deployments", // "response": { - // "$ref": "GoogleCloudApigeeV1TargetServer" + // "$ref": "GoogleCloudApigeeV1Deployment" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -38998,35 +39476,39 @@ func (c *OrganizationsEnvironmentsTargetserversGetCall) Do(opts ...googleapi.Cal } -// method id "apigee.organizations.environments.targetservers.update": +// method id "apigee.organizations.environments.sharedflows.revisions.undeploy": -type OrganizationsEnvironmentsTargetserversUpdateCall struct { - s *Service - name string - googlecloudapigeev1targetserver *GoogleCloudApigeeV1TargetServer - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall struct { + s *Service + name string + 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. +// 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: 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)} +// - 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 - 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 *OrganizationsEnvironmentsTargetserversUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversUpdateCall { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -39034,21 +39516,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 *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 *OrganizationsEnvironmentsTargetserversUpdateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsSharedflowsRevisionsUndeployCall) 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 *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_ { @@ -39056,16 +39538,11 @@ 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) - 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") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -39076,14 +39553,14 @@ func (c *OrganizationsEnvironmentsTargetserversUpdateCall) doRequest(alt string) 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 +// 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 *OrganizationsEnvironmentsTargetserversUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TargetServer, 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 { @@ -39102,7 +39579,7 @@ func (c *OrganizationsEnvironmentsTargetserversUpdateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1TargetServer{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39114,28 +39591,25 @@ 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": "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 TargetServer to replace. Must be of the form `organizations/{org}/environments/{env}/targetservers/{target_server_id}`.", + // "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/[^/]+/targetservers/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/sharedflows/[^/]+/revisions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleCloudApigeeV1TargetServer" - // }, + // "path": "v1/{+name}/deployments", // "response": { - // "$ref": "GoogleCloudApigeeV1TargetServer" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -39144,213 +39618,202 @@ func (c *OrganizationsEnvironmentsTargetserversUpdateCall) Do(opts ...googleapi. } -// method id "apigee.organizations.environments.traceConfig.overrides.create": +// method id "apigee.organizations.environments.stats.get": -type OrganizationsEnvironmentsTraceConfigOverridesCreateCall struct { - s *Service - parent string - googlecloudapigeev1traceconfigoverride *GoogleCloudApigeeV1TraceConfigOverride - 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 } -// 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: 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. // -// - 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: 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 } -// 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 { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// 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 } -// Context sets the context 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 { - c.ctx_ = ctx +// 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 } -// 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 { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// 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 } -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()) - 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}/overrides") - 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) +// 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 } -// 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 { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - 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": "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" - // ], - // "parameters": { - // "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/{+parent}/overrides", - // "request": { - // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" - // }, - // "response": { - // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } +// 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 } -// method id "apigee.organizations.environments.traceConfig.overrides.delete": +// 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 +} -type OrganizationsEnvironmentsTraceConfigOverridesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 } -// Delete: Deletes a distributed trace configuration override. -// -// - 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 +// 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 *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall { +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 *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Context(ctx context.Context) *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall { +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 *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Header() http.Header { +func (c *OrganizationsEnvironmentsStatsGetCall) 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 *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()) + 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 } @@ -39361,14 +39824,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 -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// 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 *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 { @@ -39387,7 +39850,7 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudApigeeV1Stats{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39399,25 +39862,100 @@ 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": "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. Name of the trace configuration override. Use the following structure in your request: \"organizations/*/environments/*/traceConfig/overrides/*\".", + // "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/[^/]+/traceConfig/overrides/[^/]+$", + // "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}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudApigeeV1Stats" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -39426,98 +39964,97 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Do(opts ...goo } -// method id "apigee.organizations.environments.traceConfig.overrides.get": +// method id "apigee.organizations.environments.targetservers.create": -type OrganizationsEnvironmentsTraceConfigOverridesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsTargetserversCreateCall struct { + s *Service + parent string + googlecloudapigeev1targetserver *GoogleCloudApigeeV1TargetServer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a trace configuration override. +// Create: Creates a TargetServer in the specified environment. // -// - 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 +// - 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) return c } // 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 *OrganizationsEnvironmentsTargetserversCreateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversCreateCall { 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 *OrganizationsEnvironmentsTraceConfigOverridesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsTraceConfigOverridesGetCall { - 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 *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsTraceConfigOverridesGetCall { +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 *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTargetserversCreateCall) 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 *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_ { 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/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetservers") 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.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 +// 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 // because http.StatusNotModified was returned. -func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TraceConfigOverride, 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 { @@ -39536,7 +40073,7 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1TraceConfigOverride{ + ret := &GoogleCloudApigeeV1TargetServer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39548,25 +40085,33 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Do(opts ...google } return ret, nil // { - // "description": "Gets a trace configuration override.", - // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig/overrides/{overridesId}", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.traceConfig.overrides.get", + // "description": "Creates a TargetServer in the specified environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/targetservers", + // "httpMethod": "POST", + // "id": "apigee.organizations.environments.targetservers.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "name": { - // "description": "Required. Name of the trace configuration override. Use the following structure in your request: \"organizations/*/environments/*/traceConfig/overrides/*\".", + // "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}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig/overrides/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/targetservers", + // "request": { + // "$ref": "GoogleCloudApigeeV1TargetServer" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" + // "$ref": "GoogleCloudApigeeV1TargetServer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -39575,118 +40120,84 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Do(opts ...google } -// method id "apigee.organizations.environments.traceConfig.overrides.list": +// method id "apigee.organizations.environments.targetservers.delete": -type OrganizationsEnvironmentsTraceConfigOverridesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsTargetserversDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all of the distributed trace configuration overrides in -// an environment. +// Delete: Deletes a TargetServer from an environment. Returns the +// deleted TargetServer resource. // -// - 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 -} - -// 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 -} - -// 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) +// - 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 } // 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 *OrganizationsEnvironmentsTargetserversDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversDeleteCall { 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 *OrganizationsEnvironmentsTraceConfigOverridesListCall) Context(ctx context.Context) *OrganizationsEnvironmentsTraceConfigOverridesListCall { +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 *OrganizationsEnvironmentsTraceConfigOverridesListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTargetserversDeleteCall) 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 *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_ { 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}/overrides") + 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.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) { +// 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 +// a response was returned 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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39705,7 +40216,7 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListTraceConfigOverridesResponse{ + ret := &GoogleCloudApigeeV1TargetServer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39717,36 +40228,25 @@ 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", - // "httpMethod": "GET", - // "id": "apigee.organizations.environments.traceConfig.overrides.list", + // "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", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "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": "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.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Parent resource of the trace configuration override. Use the following structure in your request: \"organizations/*/environments/*/traceConfig\".", + // "name": { + // "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/[^/]+/traceConfig$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/targetservers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/overrides", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1ListTraceConfigOverridesResponse" + // "$ref": "GoogleCloudApigeeV1TargetServer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -39755,103 +40255,79 @@ 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 { - 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.traceConfig.overrides.patch": +// method id "apigee.organizations.environments.targetservers.get": -type OrganizationsEnvironmentsTraceConfigOverridesPatchCall struct { - s *Service - name string - googlecloudapigeev1traceconfigoverride *GoogleCloudApigeeV1TraceConfigOverride - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsTargetserversGetCall 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: Gets a TargetServer resource. // -// - 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: 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 - 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 *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesPatchCall { +func (c *OrganizationsEnvironmentsTargetserversGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversGetCall { 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 *OrganizationsEnvironmentsTargetserversGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsTargetserversGetCall { + 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 *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Context(ctx context.Context) *OrganizationsEnvironmentsTraceConfigOverridesPatchCall { +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 *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTargetserversGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) 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_ { 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/{+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 } @@ -39862,15 +40338,14 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// 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 +// 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 *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1TraceConfigOverride, 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 { @@ -39889,7 +40364,7 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1TraceConfigOverride{ + ret := &GoogleCloudApigeeV1TargetServer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39901,34 +40376,25 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Do(opts ...goog } 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", + // "description": "Gets a TargetServer resource.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/targetservers/{targetserversId}", + // "httpMethod": "GET", + // "id": "apigee.organizations.environments.targetservers.get", // "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. 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/[^/]+/traceConfig/overrides/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/targetservers/[^/]+$", // "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" + // "$ref": "GoogleCloudApigeeV1TargetServer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -39937,36 +40403,35 @@ func (c *OrganizationsEnvironmentsTraceConfigOverridesPatchCall) Do(opts ...goog } -// method id "apigee.organizations.hostQueries.create": +// method id "apigee.organizations.environments.targetservers.update": -type OrganizationsHostQueriesCreateCall struct { - s *Service - parent string - googlecloudapigeev1query *GoogleCloudApigeeV1Query - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsTargetserversUpdateCall struct { + s *Service + name string + googlecloudapigeev1targetserver *GoogleCloudApigeeV1TargetServer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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. +// 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: 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 +// - 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 *OrganizationsHostQueriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsHostQueriesCreateCall { +func (c *OrganizationsEnvironmentsTargetserversUpdateCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTargetserversUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -39974,21 +40439,21 @@ func (c *OrganizationsHostQueriesCreateCall) 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 *OrganizationsHostQueriesCreateCall) Context(ctx context.Context) *OrganizationsHostQueriesCreateCall { +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 *OrganizationsHostQueriesCreateCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTargetserversUpdateCall) 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 *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_ { @@ -39996,34 +40461,34 @@ func (c *OrganizationsHostQueriesCreateCall) doRequest(alt string) (*http.Respon } 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.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}/hostQueries") + 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.hostQueries.create" call. -// Exactly one of *GoogleCloudApigeeV1AsyncQuery or error will be +// 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 *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 +// 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 *OrganizationsHostQueriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQuery, error) { +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 { @@ -40042,7 +40507,7 @@ func (c *OrganizationsHostQueriesCreateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1AsyncQuery{ + ret := &GoogleCloudApigeeV1TargetServer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40054,28 +40519,28 @@ 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": "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. The parent resource name. Must be of the form `organizations/{org}`.", + // "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/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/targetservers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/hostQueries", + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudApigeeV1Query" + // "$ref": "GoogleCloudApigeeV1TargetServer" // }, // "response": { - // "$ref": "GoogleCloudApigeeV1AsyncQuery" + // "$ref": "GoogleCloudApigeeV1TargetServer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -40084,98 +40549,94 @@ func (c *OrganizationsHostQueriesCreateCall) Do(opts ...googleapi.CallOption) (* } -// method id "apigee.organizations.hostQueries.get": +// method id "apigee.organizations.environments.traceConfig.overrides.create": -type OrganizationsHostQueriesGetCall struct { - s *Service - name 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 } -// 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 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. // -// - 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: 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 return 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 *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 *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 *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 *OrganizationsHostQueriesGetCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTraceConfigOverridesCreateCall) 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 *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/{+name}") + 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{ - "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 -// googleapi.IsNotModified to check whether the returned error was +// 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 *OrganizationsHostQueriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQuery, error) { +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 { @@ -40194,7 +40655,7 @@ func (c *OrganizationsHostQueriesGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1AsyncQuery{ + ret := &GoogleCloudApigeeV1TraceConfigOverride{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40206,25 +40667,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 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": [ - // "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. Parent resource of the trace configuration override. Use the following structure in your request. \"organizations/*/environments/*/traceConfig\".", // "location": "path", - // "pattern": "^organizations/[^/]+/hostQueries/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/overrides", + // "request": { + // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1AsyncQuery" + // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -40233,27 +40697,23 @@ func (c *OrganizationsHostQueriesGetCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "apigee.organizations.hostQueries.getResult": +// method id "apigee.organizations.environments.traceConfig.overrides.delete": -type OrganizationsHostQueriesGetResultCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsEnvironmentsTraceConfigOverridesDeleteCall 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 a distributed trace configuration override. // -// - 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 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 return c } @@ -40261,54 +40721,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 *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall { 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 *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 *OrganizationsHostQueriesGetResultCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTraceConfigOverridesDeleteCall) 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 *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_ { 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 } @@ -40319,14 +40766,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 +// 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 -// *GoogleApiHttpBody.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 *OrganizationsHostQueriesGetResultCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, 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 { @@ -40345,7 +40792,7 @@ func (c *OrganizationsHostQueriesGetResultCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleApiHttpBody{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40357,25 +40804,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 a distributed trace configuration override.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig/overrides/{overridesId}", + // "httpMethod": "DELETE", + // "id": "apigee.organizations.environments.traceConfig.overrides.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 trace configuration override. Use the following structure in your request: \"organizations/*/environments/*/traceConfig/overrides/*\".", // "location": "path", - // "pattern": "^organizations/[^/]+/hostQueries/[^/]+/result$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig/overrides/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleApiHttpBody" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -40384,9 +40831,9 @@ func (c *OrganizationsHostQueriesGetResultCall) Do(opts ...googleapi.CallOption) } -// method id "apigee.organizations.hostQueries.getResultView": +// method id "apigee.organizations.environments.traceConfig.overrides.get": -type OrganizationsHostQueriesGetResultViewCall struct { +type OrganizationsEnvironmentsTraceConfigOverridesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -40395,12 +40842,13 @@ type OrganizationsHostQueriesGetResultViewCall struct { header_ http.Header } -// GetResultView: +// Get: Gets a trace configuration override. // -// - 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 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 } @@ -40408,7 +40856,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 *OrganizationsEnvironmentsTraceConfigOverridesGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -40418,7 +40866,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 *OrganizationsEnvironmentsTraceConfigOverridesGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsTraceConfigOverridesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -40426,21 +40874,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 *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 *OrganizationsHostQueriesGetResultViewCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTraceConfigOverridesGetCall) 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 *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_ { @@ -40466,15 +40914,15 @@ 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 +// 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 -// *GoogleCloudApigeeV1AsyncQueryResultView.ServerResponse.Header or (if +// *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 *OrganizationsHostQueriesGetResultViewCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQueryResultView, error) { +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 { @@ -40493,7 +40941,7 @@ func (c *OrganizationsHostQueriesGetResultViewCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1AsyncQueryResultView{ + ret := &GoogleCloudApigeeV1TraceConfigOverride{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40505,25 +40953,25 @@ func (c *OrganizationsHostQueriesGetResultViewCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "", - // "flatPath": "v1/organizations/{organizationsId}/hostQueries/{hostQueriesId}/resultView", + // "description": "Gets a trace configuration override.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig/overrides/{overridesId}", // "httpMethod": "GET", - // "id": "apigee.organizations.hostQueries.getResultView", + // "id": "apigee.organizations.environments.traceConfig.overrides.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 trace configuration override. Use the following structure in your request: \"organizations/*/environments/*/traceConfig/overrides/*\".", // "location": "path", - // "pattern": "^organizations/[^/]+/hostQueries/[^/]+/resultView$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig/overrides/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1AsyncQueryResultView" + // "$ref": "GoogleCloudApigeeV1TraceConfigOverride" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -40532,9 +40980,9 @@ func (c *OrganizationsHostQueriesGetResultViewCall) Do(opts ...googleapi.CallOpt } -// method id "apigee.organizations.hostQueries.list": +// method id "apigee.organizations.environments.traceConfig.overrides.list": -type OrganizationsHostQueriesListCall struct { +type OrganizationsEnvironmentsTraceConfigOverridesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -40543,72 +40991,40 @@ type OrganizationsHostQueriesListCall struct { header_ http.Header } -// List: Return a list of Asynchronous Queries at host level. +// List: Lists all of the distributed trace configuration overrides in +// an environment. // -// - 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: 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 } -// 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 +// 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 } -// 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": 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 *OrganizationsHostQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsHostQueriesListCall { +func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsTraceConfigOverridesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -40618,7 +41034,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 *OrganizationsEnvironmentsTraceConfigOverridesListCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsTraceConfigOverridesListCall { c.ifNoneMatch_ = entityTag return c } @@ -40626,21 +41042,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 *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 *OrganizationsHostQueriesListCall) Header() http.Header { +func (c *OrganizationsEnvironmentsTraceConfigOverridesListCall) 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 *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_ { @@ -40653,7 +41069,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}/overrides") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -40666,16 +41082,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 -// 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 +// 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 *OrganizationsHostQueriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListAsyncQueriesResponse, error) { +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 { @@ -40694,7 +41110,7 @@ func (c *OrganizationsHostQueriesListCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1ListAsyncQueriesResponse{ + ret := &GoogleCloudApigeeV1ListTraceConfigOverridesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40706,60 +41122,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 of the distributed trace configuration overrides in an environment.", + // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/traceConfig/overrides", // "httpMethod": "GET", - // "id": "apigee.organizations.hostQueries.list", + // "id": "apigee.organizations.environments.traceConfig.overrides.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "dataset": { - // "description": "Filter response list by dataset. Example: `api`, `mint`", + // "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": "string" + // "type": "integer" // }, - // "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.", + // "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. The parent resource name. Must be of the form `organizations/{org}`.", + // "description": "Required. Parent resource of the trace configuration override. Use the following structure in your request: \"organizations/*/environments/*/traceConfig\".", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/environments/[^/]+/traceConfig$", // "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}/overrides", // "response": { - // "$ref": "GoogleCloudApigeeV1ListAsyncQueriesResponse" + // "$ref": "GoogleCloudApigeeV1ListTraceConfigOverridesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -40768,146 +41160,362 @@ func (c *OrganizationsHostQueriesListCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "apigee.organizations.hostStats.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 *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 OrganizationsHostStatsGetCall 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 } -// 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. +// 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: 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)} +// - 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 } -// 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) +// 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 } -// 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) +// 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)) return c } -// 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) +// Context sets the context 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 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 *OrganizationsHostStatsGetCall) Limit(limit string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("limit", limit) - 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_ } -// 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 +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) } -// 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 +// 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" + // ] + // } + } -// 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 +// method id "apigee.organizations.hostQueries.create": + +type OrganizationsHostQueriesCreateCall struct { + s *Service + parent string + googlecloudapigeev1query *GoogleCloudApigeeV1Query + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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) +// 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 return c } -// 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) +// 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 { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) 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 *OrganizationsHostStatsGetCall) TimeRange(timeRange string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("timeRange", timeRange) +// Context sets the context 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 { + c.ctx_ = ctx return c } -// 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 +// 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 { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -// 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 +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_ { + 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 + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hostQueries") + 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) } -// 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 +// 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 *OrganizationsHostQueriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQuery, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1AsyncQuery{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource name. Must be of the form `organizations/{org}`.", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/hostQueries", + // "request": { + // "$ref": "GoogleCloudApigeeV1Query" + // }, + // "response": { + // "$ref": "GoogleCloudApigeeV1AsyncQuery" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } -// Tzo sets the optional parameter "tzo": Timezone offset value. -func (c *OrganizationsHostStatsGetCall) Tzo(tzo string) *OrganizationsHostStatsGetCall { - c.urlParams_.Set("tzo", tzo) +// method id "apigee.organizations.hostQueries.get": + +type OrganizationsHostQueriesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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" +// +// - 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 *OrganizationsHostStatsGetCall) Fields(s ...googleapi.Field) *OrganizationsHostStatsGetCall { +func (c *OrganizationsHostQueriesGetCall) Fields(s ...googleapi.Field) *OrganizationsHostQueriesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -40917,7 +41525,7 @@ func (c *OrganizationsHostStatsGetCall) 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 *OrganizationsHostStatsGetCall) IfNoneMatch(entityTag string) *OrganizationsHostStatsGetCall { +func (c *OrganizationsHostQueriesGetCall) IfNoneMatch(entityTag string) *OrganizationsHostQueriesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -40925,21 +41533,21 @@ func (c *OrganizationsHostStatsGetCall) 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 *OrganizationsHostStatsGetCall) Context(ctx context.Context) *OrganizationsHostStatsGetCall { +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 *OrganizationsHostStatsGetCall) Header() http.Header { +func (c *OrganizationsHostQueriesGetCall) 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 *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_ { @@ -40965,14 +41573,14 @@ func (c *OrganizationsHostStatsGetCall) doRequest(alt string) (*http.Response, e 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 +// 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 *OrganizationsHostStatsGetCall) 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 { @@ -40991,7 +41599,7 @@ func (c *OrganizationsHostStatsGetCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudApigeeV1Stats{ + ret := &GoogleCloudApigeeV1AsyncQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41003,83 +41611,880 @@ 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}", + // "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.hostStats.get", + // "id": "apigee.organizations.hostQueries.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`", + // "description": "Required. Name of the asynchronous query to get. Must be of the form `organizations/{org}/queries/{queryId}`.", // "location": "path", - // "pattern": "^organizations/[^/]+/hostStats/.*$", + // "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" - // }, - // "sort": { - // "description": "Flag that specifies if the sort order should be ascending or descending. Valid values are `DESC` and `ASC`.", - // "location": "query", + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudApigeeV1AsyncQuery" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.hostQueries.getResult": + +type OrganizationsHostQueriesGetResultCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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` +// +// - 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 *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 *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 *OrganizationsHostQueriesGetResultCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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()) + 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.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 *OrganizationsHostQueriesGetResultCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleApiHttpBody{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the asynchronous query result to get. Must be of the form `organizations/{org}/queries/{queryId}/result`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/hostQueries/[^/]+/result$", + // "required": true, // "type": "string" - // }, - // "sortby": { - // "description": "Comma-separated list of columns to sort the final result.", + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleApiHttpBody" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.hostQueries.getResultView": + +type OrganizationsHostQueriesGetResultViewCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetResultView: +// +// - 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 +} + +// 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 { + 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 *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 *OrganizationsHostQueriesGetResultViewCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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("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.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 *OrganizationsHostQueriesGetResultViewCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1AsyncQueryResultView, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1AsyncQueryResultView{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "", + // "flatPath": "v1/organizations/{organizationsId}/hostQueries/{hostQueriesId}/resultView", + // "httpMethod": "GET", + // "id": "apigee.organizations.hostQueries.getResultView", + // "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`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/hostQueries/[^/]+/resultView$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudApigeeV1AsyncQueryResultView" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.hostQueries.list": + +type OrganizationsHostQueriesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Return a list of Asynchronous Queries at host level. +// +// - 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 *OrganizationsHostQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsHostQueriesListCall { + 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 *OrganizationsHostQueriesListCall) IfNoneMatch(entityTag string) *OrganizationsHostQueriesListCall { + 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 *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 *OrganizationsHostQueriesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + 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}/hostQueries") + 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.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 { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1ListAsyncQueriesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Return a list of Asynchronous Queries at host level.", + // "flatPath": "v1/organizations/{organizationsId}/hostQueries", + // "httpMethod": "GET", + // "id": "apigee.organizations.hostQueries.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "dataset": { + // "description": "Filter response list by dataset. Example: `api`, `mint`", // "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`", + // "envgroupHostname": { + // "description": "Required. Filter response list by hostname.", // "location": "query", // "type": "string" // }, - // "timeUnit": { - // "description": "Granularity of metrics returned. Valid values include: `second`, `minute`, `hour`, `day`, `week`, or `month`.", + // "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" // }, - // "topk": { - // "description": "Top number of results to return. For example, to return the top 5 results, set `topk=5`.", + // "inclQueriesWithoutReport": { + // "description": "Flag to include asynchronous queries that don't have a report denifition.", // "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`.", + // "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 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", + // "response": { + // "$ref": "GoogleCloudApigeeV1ListAsyncQueriesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// 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 +} + +// 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 +} + +// 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 +} + +// 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 +} + +// 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 +} + +// 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 +} + +// 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 +} + +// 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 +} + +// 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 *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 *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 *OrganizationsHostStatsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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()) + 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.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) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1Stats{ + ServerResponse: googleapi.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 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" // }, @@ -41089,9 +42494,938 @@ func (c *OrganizationsHostStatsGetCall) Do(opts ...googleapi.CallOption) (*Googl // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudApigeeV1Stats" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.instances.create": + +type OrganizationsInstancesCreateCall struct { + s *Service + parent string + googlecloudapigeev1instance *GoogleCloudApigeeV1Instance + 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. +// +// - 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 *OrganizationsInstancesCreateCall) Fields(s ...googleapi.Field) *OrganizationsInstancesCreateCall { + 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 *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 *OrganizationsInstancesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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()) + 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/{+parent}/instances") + 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.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 *OrganizationsInstancesCreateCall) 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 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" + // ] + // } + +} + +// method id "apigee.organizations.instances.delete": + +type OrganizationsInstancesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + 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. +// +// - 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 +} + +// 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 { + 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 *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 *OrganizationsInstancesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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()) + 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.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 *OrganizationsInstancesDeleteCall) 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": "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" + // ] + // } + +} + +// method id "apigee.organizations.instances.get": + +type OrganizationsInstancesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details for an Apigee runtime instance. **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)} + 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 *OrganizationsInstancesGetCall) Fields(s ...googleapi.Field) *OrganizationsInstancesGetCall { + 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 *OrganizationsInstancesGetCall) IfNoneMatch(entityTag string) *OrganizationsInstancesGetCall { + 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 *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 *OrganizationsInstancesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + 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.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 *OrganizationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Instance, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1Instance{ + ServerResponse: googleapi.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 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": [ + // "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": "GoogleCloudApigeeV1Instance" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigee.organizations.instances.list": + +type OrganizationsInstancesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all Apigee runtime instances for the organization. +// **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)} + 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 { + 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 { + 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 *OrganizationsInstancesListCall) Fields(s ...googleapi.Field) *OrganizationsInstancesListCall { + 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 *OrganizationsInstancesListCall) IfNoneMatch(entityTag string) *OrganizationsInstancesListCall { + 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 *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 *OrganizationsInstancesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + 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}/instances") + 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.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 +// *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 *OrganizationsInstancesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1ListInstancesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1ListInstancesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all Apigee runtime instances for the organization. **Note:** Not supported for Apigee hybrid.", + // "flatPath": "v1/organizations/{organizationsId}/instances", + // "httpMethod": "GET", + // "id": "apigee.organizations.instances.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of instances 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.", + // "location": "query", + // "type": "string" + // }, + // "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", + // "response": { + // "$ref": "GoogleCloudApigeeV1ListInstancesResponse" + // }, + // "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 *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) + } +} + +// method id "apigee.organizations.instances.patch": + +type OrganizationsInstancesPatchCall struct { + s *Service + name string + googlecloudapigeev1instance *GoogleCloudApigeeV1Instance + 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. +// +// - 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) + return 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 { + 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 *OrganizationsInstancesPatchCall) Context(ctx context.Context) *OrganizationsInstancesPatchCall { + c.ctx_ = 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 { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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) +} + +// 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" + // ] + // } + +} + +// method id "apigee.organizations.instances.reportStatus": + +type OrganizationsInstancesReportStatusCall struct { + s *Service + instance string + googlecloudapigeev1reportinstancestatusrequest *GoogleCloudApigeeV1ReportInstanceStatusRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// 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 *OrganizationsInstancesReportStatusCall) Fields(s ...googleapi.Field) *OrganizationsInstancesReportStatusCall { + 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 *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 *OrganizationsInstancesReportStatusCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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()) + 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/{+instance}:reportStatus") + 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{ + "instance": c.instance, + }) + 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) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudApigeeV1ReportInstanceStatusResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Reports the latest status for a runtime instance.", + // "flatPath": "v1/organizations/{organizationsId}/instances/{instancesId}:reportStatus", + // "httpMethod": "POST", + // "id": "apigee.organizations.instances.reportStatus", + // "parameterOrder": [ + // "instance" + // ], + // "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}", + // "location": "path", + // "pattern": "^organizations/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+instance}:reportStatus", + // "request": { + // "$ref": "GoogleCloudApigeeV1ReportInstanceStatusRequest" + // }, // "response": { - // "$ref": "GoogleCloudApigeeV1Stats" + // "$ref": "GoogleCloudApigeeV1ReportInstanceStatusResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -41100,34 +43434,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 } @@ -41135,21 +43468,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_ { @@ -41157,14 +43490,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 { @@ -41177,14 +43510,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 { @@ -41215,25 +43548,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" @@ -41245,9 +43578,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 @@ -41255,14 +43588,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 } @@ -41270,7 +43603,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 } @@ -41278,21 +43611,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_ { @@ -41315,14 +43648,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 { @@ -41353,18 +43686,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" // } @@ -41380,9 +43713,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 @@ -41391,13 +43724,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 } @@ -41405,7 +43738,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 } @@ -41415,7 +43748,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 } @@ -41423,21 +43756,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_ { @@ -41463,14 +43796,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 { @@ -41489,7 +43823,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, @@ -41501,25 +43835,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" @@ -41528,9 +43862,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 @@ -41539,28 +43873,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 } @@ -41568,7 +43902,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 } @@ -41578,7 +43912,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 } @@ -41586,21 +43920,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_ { @@ -41613,7 +43947,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 { @@ -41626,16 +43960,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 { @@ -41654,7 +43988,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, @@ -41666,36 +44000,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" @@ -41707,7 +44041,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 { @@ -41725,41 +44059,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 } @@ -41767,21 +44092,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_ { @@ -41789,34 +44114,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 { @@ -41847,31 +44172,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" @@ -41883,33 +44202,185 @@ 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 +} + +// Get: Gets a CanaryEvaluation for 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)} + 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 *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 *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 *OrganizationsInstancesCanaryevaluationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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 + 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 } -// ReportStatus: Reports the latest status for a runtime instance. +// Activate: Activates the NAT address. The Apigee instance can now use +// this for Internet egress traffic. **Note:** Not supported for Apigee +// hybrid. // -// - 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 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 *OrganizationsInstancesReportStatusCall) Fields(s ...googleapi.Field) *OrganizationsInstancesReportStatusCall { +func (c *OrganizationsInstancesNatAddressesActivateCall) Fields(s ...googleapi.Field) *OrganizationsInstancesNatAddressesActivateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -41917,21 +44388,21 @@ func (c *OrganizationsInstancesReportStatusCall) 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 *OrganizationsInstancesReportStatusCall) Context(ctx context.Context) *OrganizationsInstancesReportStatusCall { +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 *OrganizationsInstancesReportStatusCall) Header() http.Header { +func (c *OrganizationsInstancesNatAddressesActivateCall) 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 *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_ { @@ -41939,14 +44410,14 @@ func (c *OrganizationsInstancesReportStatusCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudapigeev1reportinstancestatusrequest) + 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 { @@ -41954,21 +44425,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 { @@ -41987,7 +44456,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, @@ -41999,28 +44468,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" @@ -42029,33 +44498,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 } @@ -42063,21 +44536,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_ { @@ -42085,14 +44558,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 { @@ -42105,14 +44578,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 { @@ -42143,25 +44616,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" @@ -42173,9 +44646,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 @@ -42183,14 +44656,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 } @@ -42198,7 +44673,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 } @@ -42206,21 +44681,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_ { @@ -42243,14 +44718,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 { @@ -42281,18 +44756,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" // } @@ -42308,9 +44783,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 @@ -42319,13 +44794,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 } @@ -42333,7 +44810,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 } @@ -42343,7 +44820,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 } @@ -42351,21 +44828,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_ { @@ -42391,15 +44868,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 { @@ -42418,7 +44894,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, @@ -42430,25 +44906,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" @@ -42457,9 +44933,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 @@ -42468,28 +44944,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 } @@ -42497,7 +44973,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 } @@ -42507,7 +44983,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 } @@ -42515,21 +44991,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_ { @@ -42542,7 +45018,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 { @@ -42555,16 +45031,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 { @@ -42583,7 +45059,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, @@ -42595,36 +45071,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" @@ -42636,7 +45112,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 { @@ -42654,32 +45130,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 } @@ -42687,21 +45164,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_ { @@ -42709,14 +45186,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 { @@ -42729,14 +45206,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 { @@ -42755,7 +45232,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, @@ -42767,177 +45244,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" - // }, - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "apigee.organizations.instances.canaryevaluations.get": - -type OrganizationsInstancesCanaryevaluationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a CanaryEvaluation for 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)} - 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 *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 *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 *OrganizationsInstancesCanaryevaluationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -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 - 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" - // } + // "$ref": "GoogleCloudApigeeV1KeyValueMap" // }, - // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudApigeeV1CanaryEvaluation" + // "$ref": "GoogleCloudApigeeV1KeyValueMap" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -42946,36 +45274,30 @@ func (c *OrganizationsInstancesCanaryevaluationsGetCall) Do(opts ...googleapi.Ca } -// method id "apigee.organizations.instances.natAddresses.activate": +// method id "apigee.organizations.keyvaluemaps.delete": -type OrganizationsInstancesNatAddressesActivateCall struct { - s *Service - name string - googlecloudapigeev1activatenataddressrequest *GoogleCloudApigeeV1ActivateNatAddressRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsKeyvaluemapsDeleteCall struct { + s *Service + name string + 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. +// Delete: Deletes a key value map from an organization. // -// - 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)} +// - 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 - 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 { +func (c *OrganizationsKeyvaluemapsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsKeyvaluemapsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -42983,21 +45305,21 @@ func (c *OrganizationsInstancesNatAddressesActivateCall) 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 *OrganizationsInstancesNatAddressesActivateCall) Context(ctx context.Context) *OrganizationsInstancesNatAddressesActivateCall { +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 *OrganizationsInstancesNatAddressesActivateCall) Header() http.Header { +func (c *OrganizationsKeyvaluemapsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInstancesNatAddressesActivateCall) 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_ { @@ -43005,16 +45327,11 @@ func (c *OrganizationsInstancesNatAddressesActivateCall) doRequest(alt string) ( } 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 := 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 } @@ -43025,14 +45342,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 { @@ -43051,7 +45368,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, @@ -43063,28 +45380,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" @@ -43093,37 +45407,38 @@ 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 org, env or apis scoped key +// value map. // -// - 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 formats 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 } @@ -43131,21 +45446,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_ { @@ -43153,14 +45468,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 { @@ -43173,14 +45488,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 { @@ -43199,7 +45514,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, @@ -43211,28 +45526,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 org, env or apis scoped key value map.", + // "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 formats 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" @@ -43241,9 +45556,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 @@ -43251,16 +45566,19 @@ 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 an org, environment 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) 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 formats 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 } @@ -43268,7 +45586,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 } @@ -43276,21 +45594,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_ { @@ -43313,14 +45631,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 { @@ -43339,7 +45657,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, @@ -43351,25 +45669,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 an org, environment or apis scoped key value map.", + // "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 formats 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" @@ -43378,9 +45696,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 @@ -43389,15 +45707,19 @@ 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 formats 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 } @@ -43405,7 +45727,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 } @@ -43415,7 +45737,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 } @@ -43423,21 +45745,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_ { @@ -43463,14 +45785,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 { @@ -43489,7 +45811,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, @@ -43501,25 +45823,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 formats 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" @@ -43528,9 +45850,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 @@ -43539,28 +45861,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 formats 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, a key +// value entry returned from a previous call that can use to retrieve +// the next page. +func (c *OrganizationsKeyvaluemapsEntriesListCall) PageToken(pageToken string) *OrganizationsKeyvaluemapsEntriesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -43568,7 +45896,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 } @@ -43578,7 +45906,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 } @@ -43586,21 +45914,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_ { @@ -43613,7 +45941,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 { @@ -43626,16 +45954,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 { @@ -43654,7 +45982,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, @@ -43666,36 +45994,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, a key value entry returned from a previous call that can use 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 formats 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" @@ -43707,7 +46035,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 { @@ -43725,283 +46053,6 @@ func (c *OrganizationsInstancesNatAddressesListCall) Pages(ctx context.Context, } } -// method id "apigee.organizations.keyvaluemaps.create": - -type OrganizationsKeyvaluemapsCreateCall struct { - s *Service - parent string - googlecloudapigeev1keyvaluemap *GoogleCloudApigeeV1KeyValueMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a key value map in an organization. -// -// - 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 - return 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 { - 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 *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 *OrganizationsKeyvaluemapsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -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_ { - 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 - } - 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 += "?" + 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.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 *OrganizationsKeyvaluemapsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueMap, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudApigeeV1KeyValueMap{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a key value map in an organization.", - // "flatPath": "v1/organizations/{organizationsId}/keyvaluemaps", - // "httpMethod": "POST", - // "id": "apigee.organizations.keyvaluemaps.create", - // "parameterOrder": [ - // "parent" - // ], - // "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}`", - // "location": "path", - // "pattern": "^organizations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/keyvaluemaps", - // "request": { - // "$ref": "GoogleCloudApigeeV1KeyValueMap" - // }, - // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueMap" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "apigee.organizations.keyvaluemaps.delete": - -type OrganizationsKeyvaluemapsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a key value map from an organization. -// -// - 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 -} - -// 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 { - 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 *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 *OrganizationsKeyvaluemapsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -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()) - 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.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 *OrganizationsKeyvaluemapsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1KeyValueMap, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GoogleCloudApigeeV1KeyValueMap{ - ServerResponse: googleapi.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 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 key value map. Use the following structure in your request: `organizations/{org}/keyvaluemaps/{keyvaluemap}`", - // "location": "path", - // "pattern": "^organizations/[^/]+/keyvaluemaps/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "GoogleCloudApigeeV1KeyValueMap" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "apigee.organizations.operations.get": type OrganizationsOperationsGetCall struct { diff --git a/cloudasset/v1/cloudasset-api.json b/cloudasset/v1/cloudasset-api.json index db2b78f88a6..635caef033c 100644 --- a/cloudasset/v1/cloudasset-api.json +++ b/cloudasset/v1/cloudasset-api.json @@ -929,7 +929,7 @@ } } }, - "revision": "20220520", + "revision": "20220528", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -2194,6 +2194,13 @@ "description": "Defines the conditions under which an EgressPolicy matches a request. Conditions are based on information about the ApiOperation intended to be performed on the `resources` specified. Note that if the destination of the request is also protected by a ServicePerimeter, then that ServicePerimeter must have an IngressPolicy which allows access in order for this request to succeed. The request must match `operations` AND `resources` fields in order to be allowed egress out of the perimeter.", "id": "GoogleIdentityAccesscontextmanagerV1EgressTo", "properties": { + "externalResources": { + "description": "A list of external resources that are allowed to be accessed. A request matches if it contains an external resource in this list (Example: s3://bucket/path). Currently '*' is not allowed.", + "items": { + "type": "string" + }, + "type": "array" + }, "operations": { "description": "A list of ApiOperations allowed to be performed by the sources specified in the corresponding EgressFrom. A request matches if it uses an operation/service in this list.", "items": { diff --git a/cloudasset/v1/cloudasset-gen.go b/cloudasset/v1/cloudasset-gen.go index acb1dda3f8d..2cbe891cbb4 100644 --- a/cloudasset/v1/cloudasset-gen.go +++ b/cloudasset/v1/cloudasset-gen.go @@ -2813,6 +2813,11 @@ func (s *GoogleIdentityAccesscontextmanagerV1EgressPolicy) MarshalJSON() ([]byte // to succeed. The request must match `operations` AND `resources` // fields in order to be allowed egress out of the perimeter. type GoogleIdentityAccesscontextmanagerV1EgressTo struct { + // ExternalResources: A list of external resources that are allowed to + // be accessed. A request matches if it contains an external resource in + // this list (Example: s3://bucket/path). Currently '*' is not allowed. + ExternalResources []string `json:"externalResources,omitempty"` + // Operations: A list of ApiOperations allowed to be performed by the // sources specified in the corresponding EgressFrom. A request matches // if it uses an operation/service in this list. @@ -2826,20 +2831,21 @@ type GoogleIdentityAccesscontextmanagerV1EgressTo struct { // perimeter. Resources []string `json:"resources,omitempty"` - // ForceSendFields is a list of field names (e.g. "Operations") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ExternalResources") + // 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. "Operations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "ExternalResources") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/cloudasset/v1beta1/cloudasset-api.json b/cloudasset/v1beta1/cloudasset-api.json index 3ce47fc98c4..efe516206b7 100644 --- a/cloudasset/v1beta1/cloudasset-api.json +++ b/cloudasset/v1beta1/cloudasset-api.json @@ -411,7 +411,7 @@ } } }, - "revision": "20220520", + "revision": "20220528", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -1160,6 +1160,13 @@ "description": "Defines the conditions under which an EgressPolicy matches a request. Conditions are based on information about the ApiOperation intended to be performed on the `resources` specified. Note that if the destination of the request is also protected by a ServicePerimeter, then that ServicePerimeter must have an IngressPolicy which allows access in order for this request to succeed. The request must match `operations` AND `resources` fields in order to be allowed egress out of the perimeter.", "id": "GoogleIdentityAccesscontextmanagerV1EgressTo", "properties": { + "externalResources": { + "description": "A list of external resources that are allowed to be accessed. A request matches if it contains an external resource in this list (Example: s3://bucket/path). Currently '*' is not allowed.", + "items": { + "type": "string" + }, + "type": "array" + }, "operations": { "description": "A list of ApiOperations allowed to be performed by the sources specified in the corresponding EgressFrom. A request matches if it uses an operation/service in this list.", "items": { diff --git a/cloudasset/v1beta1/cloudasset-gen.go b/cloudasset/v1beta1/cloudasset-gen.go index 15b1d3ce439..912d06f950b 100644 --- a/cloudasset/v1beta1/cloudasset-gen.go +++ b/cloudasset/v1beta1/cloudasset-gen.go @@ -1718,6 +1718,11 @@ func (s *GoogleIdentityAccesscontextmanagerV1EgressPolicy) MarshalJSON() ([]byte // to succeed. The request must match `operations` AND `resources` // fields in order to be allowed egress out of the perimeter. type GoogleIdentityAccesscontextmanagerV1EgressTo struct { + // ExternalResources: A list of external resources that are allowed to + // be accessed. A request matches if it contains an external resource in + // this list (Example: s3://bucket/path). Currently '*' is not allowed. + ExternalResources []string `json:"externalResources,omitempty"` + // Operations: A list of ApiOperations allowed to be performed by the // sources specified in the corresponding EgressFrom. A request matches // if it uses an operation/service in this list. @@ -1731,20 +1736,21 @@ type GoogleIdentityAccesscontextmanagerV1EgressTo struct { // perimeter. Resources []string `json:"resources,omitempty"` - // ForceSendFields is a list of field names (e.g. "Operations") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ExternalResources") + // 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. "Operations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "ExternalResources") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/cloudasset/v1p1beta1/cloudasset-api.json b/cloudasset/v1p1beta1/cloudasset-api.json index ae66fd697b4..22490ba518b 100644 --- a/cloudasset/v1p1beta1/cloudasset-api.json +++ b/cloudasset/v1p1beta1/cloudasset-api.json @@ -207,7 +207,7 @@ } } }, - "revision": "20220520", + "revision": "20220528", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -862,6 +862,13 @@ "description": "Defines the conditions under which an EgressPolicy matches a request. Conditions are based on information about the ApiOperation intended to be performed on the `resources` specified. Note that if the destination of the request is also protected by a ServicePerimeter, then that ServicePerimeter must have an IngressPolicy which allows access in order for this request to succeed. The request must match `operations` AND `resources` fields in order to be allowed egress out of the perimeter.", "id": "GoogleIdentityAccesscontextmanagerV1EgressTo", "properties": { + "externalResources": { + "description": "A list of external resources that are allowed to be accessed. A request matches if it contains an external resource in this list (Example: s3://bucket/path). Currently '*' is not allowed.", + "items": { + "type": "string" + }, + "type": "array" + }, "operations": { "description": "A list of ApiOperations allowed to be performed by the sources specified in the corresponding EgressFrom. A request matches if it uses an operation/service in this list.", "items": { diff --git a/cloudasset/v1p1beta1/cloudasset-gen.go b/cloudasset/v1p1beta1/cloudasset-gen.go index a560f1fa1f3..bc2a2564612 100644 --- a/cloudasset/v1p1beta1/cloudasset-gen.go +++ b/cloudasset/v1p1beta1/cloudasset-gen.go @@ -1500,6 +1500,11 @@ func (s *GoogleIdentityAccesscontextmanagerV1EgressPolicy) MarshalJSON() ([]byte // to succeed. The request must match `operations` AND `resources` // fields in order to be allowed egress out of the perimeter. type GoogleIdentityAccesscontextmanagerV1EgressTo struct { + // ExternalResources: A list of external resources that are allowed to + // be accessed. A request matches if it contains an external resource in + // this list (Example: s3://bucket/path). Currently '*' is not allowed. + ExternalResources []string `json:"externalResources,omitempty"` + // Operations: A list of ApiOperations allowed to be performed by the // sources specified in the corresponding EgressFrom. A request matches // if it uses an operation/service in this list. @@ -1513,20 +1518,21 @@ type GoogleIdentityAccesscontextmanagerV1EgressTo struct { // perimeter. Resources []string `json:"resources,omitempty"` - // ForceSendFields is a list of field names (e.g. "Operations") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ExternalResources") + // 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. "Operations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "ExternalResources") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/cloudasset/v1p4beta1/cloudasset-api.json b/cloudasset/v1p4beta1/cloudasset-api.json index c0413792277..5a50a19e99e 100644 --- a/cloudasset/v1p4beta1/cloudasset-api.json +++ b/cloudasset/v1p4beta1/cloudasset-api.json @@ -221,7 +221,7 @@ } } }, - "revision": "20220520", + "revision": "20220528", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -1107,6 +1107,13 @@ "description": "Defines the conditions under which an EgressPolicy matches a request. Conditions are based on information about the ApiOperation intended to be performed on the `resources` specified. Note that if the destination of the request is also protected by a ServicePerimeter, then that ServicePerimeter must have an IngressPolicy which allows access in order for this request to succeed. The request must match `operations` AND `resources` fields in order to be allowed egress out of the perimeter.", "id": "GoogleIdentityAccesscontextmanagerV1EgressTo", "properties": { + "externalResources": { + "description": "A list of external resources that are allowed to be accessed. A request matches if it contains an external resource in this list (Example: s3://bucket/path). Currently '*' is not allowed.", + "items": { + "type": "string" + }, + "type": "array" + }, "operations": { "description": "A list of ApiOperations allowed to be performed by the sources specified in the corresponding EgressFrom. A request matches if it uses an operation/service in this list.", "items": { diff --git a/cloudasset/v1p4beta1/cloudasset-gen.go b/cloudasset/v1p4beta1/cloudasset-gen.go index 6d8f73e1345..36a540b82a9 100644 --- a/cloudasset/v1p4beta1/cloudasset-gen.go +++ b/cloudasset/v1p4beta1/cloudasset-gen.go @@ -1957,6 +1957,11 @@ func (s *GoogleIdentityAccesscontextmanagerV1EgressPolicy) MarshalJSON() ([]byte // to succeed. The request must match `operations` AND `resources` // fields in order to be allowed egress out of the perimeter. type GoogleIdentityAccesscontextmanagerV1EgressTo struct { + // ExternalResources: A list of external resources that are allowed to + // be accessed. A request matches if it contains an external resource in + // this list (Example: s3://bucket/path). Currently '*' is not allowed. + ExternalResources []string `json:"externalResources,omitempty"` + // Operations: A list of ApiOperations allowed to be performed by the // sources specified in the corresponding EgressFrom. A request matches // if it uses an operation/service in this list. @@ -1970,20 +1975,21 @@ type GoogleIdentityAccesscontextmanagerV1EgressTo struct { // perimeter. Resources []string `json:"resources,omitempty"` - // ForceSendFields is a list of field names (e.g. "Operations") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ExternalResources") + // 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. "Operations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "ExternalResources") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/cloudasset/v1p5beta1/cloudasset-api.json b/cloudasset/v1p5beta1/cloudasset-api.json index f8e8173dc79..07a85f75b99 100644 --- a/cloudasset/v1p5beta1/cloudasset-api.json +++ b/cloudasset/v1p5beta1/cloudasset-api.json @@ -177,7 +177,7 @@ } } }, - "revision": "20220520", + "revision": "20220528", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -867,6 +867,13 @@ "description": "Defines the conditions under which an EgressPolicy matches a request. Conditions are based on information about the ApiOperation intended to be performed on the `resources` specified. Note that if the destination of the request is also protected by a ServicePerimeter, then that ServicePerimeter must have an IngressPolicy which allows access in order for this request to succeed. The request must match `operations` AND `resources` fields in order to be allowed egress out of the perimeter.", "id": "GoogleIdentityAccesscontextmanagerV1EgressTo", "properties": { + "externalResources": { + "description": "A list of external resources that are allowed to be accessed. A request matches if it contains an external resource in this list (Example: s3://bucket/path). Currently '*' is not allowed.", + "items": { + "type": "string" + }, + "type": "array" + }, "operations": { "description": "A list of ApiOperations allowed to be performed by the sources specified in the corresponding EgressFrom. A request matches if it uses an operation/service in this list.", "items": { diff --git a/cloudasset/v1p5beta1/cloudasset-gen.go b/cloudasset/v1p5beta1/cloudasset-gen.go index ece35a46c62..8ec0525824b 100644 --- a/cloudasset/v1p5beta1/cloudasset-gen.go +++ b/cloudasset/v1p5beta1/cloudasset-gen.go @@ -1541,6 +1541,11 @@ func (s *GoogleIdentityAccesscontextmanagerV1EgressPolicy) MarshalJSON() ([]byte // to succeed. The request must match `operations` AND `resources` // fields in order to be allowed egress out of the perimeter. type GoogleIdentityAccesscontextmanagerV1EgressTo struct { + // ExternalResources: A list of external resources that are allowed to + // be accessed. A request matches if it contains an external resource in + // this list (Example: s3://bucket/path). Currently '*' is not allowed. + ExternalResources []string `json:"externalResources,omitempty"` + // Operations: A list of ApiOperations allowed to be performed by the // sources specified in the corresponding EgressFrom. A request matches // if it uses an operation/service in this list. @@ -1554,20 +1559,21 @@ type GoogleIdentityAccesscontextmanagerV1EgressTo struct { // perimeter. Resources []string `json:"resources,omitempty"` - // ForceSendFields is a list of field names (e.g. "Operations") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ExternalResources") + // 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. "Operations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "ExternalResources") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/cloudasset/v1p7beta1/cloudasset-api.json b/cloudasset/v1p7beta1/cloudasset-api.json index 3b81bacf255..0a5d4c103b0 100644 --- a/cloudasset/v1p7beta1/cloudasset-api.json +++ b/cloudasset/v1p7beta1/cloudasset-api.json @@ -167,7 +167,7 @@ } } }, - "revision": "20220520", + "revision": "20220528", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -936,6 +936,13 @@ "description": "Defines the conditions under which an EgressPolicy matches a request. Conditions are based on information about the ApiOperation intended to be performed on the `resources` specified. Note that if the destination of the request is also protected by a ServicePerimeter, then that ServicePerimeter must have an IngressPolicy which allows access in order for this request to succeed. The request must match `operations` AND `resources` fields in order to be allowed egress out of the perimeter.", "id": "GoogleIdentityAccesscontextmanagerV1EgressTo", "properties": { + "externalResources": { + "description": "A list of external resources that are allowed to be accessed. A request matches if it contains an external resource in this list (Example: s3://bucket/path). Currently '*' is not allowed.", + "items": { + "type": "string" + }, + "type": "array" + }, "operations": { "description": "A list of ApiOperations allowed to be performed by the sources specified in the corresponding EgressFrom. A request matches if it uses an operation/service in this list.", "items": { diff --git a/cloudasset/v1p7beta1/cloudasset-gen.go b/cloudasset/v1p7beta1/cloudasset-gen.go index 0f71e1f5ea7..0f559631836 100644 --- a/cloudasset/v1p7beta1/cloudasset-gen.go +++ b/cloudasset/v1p7beta1/cloudasset-gen.go @@ -1752,6 +1752,11 @@ func (s *GoogleIdentityAccesscontextmanagerV1EgressPolicy) MarshalJSON() ([]byte // to succeed. The request must match `operations` AND `resources` // fields in order to be allowed egress out of the perimeter. type GoogleIdentityAccesscontextmanagerV1EgressTo struct { + // ExternalResources: A list of external resources that are allowed to + // be accessed. A request matches if it contains an external resource in + // this list (Example: s3://bucket/path). Currently '*' is not allowed. + ExternalResources []string `json:"externalResources,omitempty"` + // Operations: A list of ApiOperations allowed to be performed by the // sources specified in the corresponding EgressFrom. A request matches // if it uses an operation/service in this list. @@ -1765,20 +1770,21 @@ type GoogleIdentityAccesscontextmanagerV1EgressTo struct { // perimeter. Resources []string `json:"resources,omitempty"` - // ForceSendFields is a list of field names (e.g. "Operations") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ExternalResources") + // 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. "Operations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "ExternalResources") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/firebase/v1beta1/firebase-api.json b/firebase/v1beta1/firebase-api.json index feedf9a9485..5a9c1ce24b6 100644 --- a/firebase/v1beta1/firebase-api.json +++ b/firebase/v1beta1/firebase-api.json @@ -1205,7 +1205,7 @@ } } }, - "revision": "20220518", + "revision": "20220531", "rootUrl": "https://firebase.googleapis.com/", "schemas": { "AddFirebaseRequest": { @@ -1931,7 +1931,8 @@ "type": "string" }, "appId": { - "description": "Immutable. The globally unique, Firebase-assigned identifier for the `WebApp`. This identifier should be treated as an opaque token, as the data format is not specified.", + "description": "Output only. Immutable. The globally unique, Firebase-assigned identifier for the `WebApp`. This identifier should be treated as an opaque token, as the data format is not specified.", + "readOnly": true, "type": "string" }, "appUrls": { @@ -1950,7 +1951,8 @@ "type": "string" }, "projectId": { - "description": "Immutable. A user-assigned unique identifier of the parent FirebaseProject for the `WebApp`.", + "description": "Output only. Immutable. A user-assigned unique identifier of the parent FirebaseProject for the `WebApp`.", + "readOnly": true, "type": "string" }, "webId": { diff --git a/firebase/v1beta1/firebase-gen.go b/firebase/v1beta1/firebase-gen.go index 9524bbcd262..c176c8b0988 100644 --- a/firebase/v1beta1/firebase-gen.go +++ b/firebase/v1beta1/firebase-gen.go @@ -1753,9 +1753,9 @@ type WebApp struct { // to an empty value in update requests. ApiKeyId string `json:"apiKeyId,omitempty"` - // AppId: Immutable. The globally unique, Firebase-assigned identifier - // for the `WebApp`. This identifier should be treated as an opaque - // token, as the data format is not specified. + // AppId: Output only. Immutable. The globally unique, Firebase-assigned + // identifier for the `WebApp`. This identifier should be treated as an + // opaque token, as the data format is not specified. AppId string `json:"appId,omitempty"` // AppUrls: The URLs where the `WebApp` is hosted. @@ -1777,8 +1777,8 @@ type WebApp struct { // (see `appId` (../projects.webApps#WebApp.FIELDS.app_id)). Name string `json:"name,omitempty"` - // ProjectId: Immutable. A user-assigned unique identifier of the parent - // FirebaseProject for the `WebApp`. + // ProjectId: Output only. Immutable. A user-assigned unique identifier + // of the parent FirebaseProject for the `WebApp`. ProjectId string `json:"projectId,omitempty"` // WebId: Output only. Immutable. A unique, Firebase-assigned identifier diff --git a/games/v1/games-api.json b/games/v1/games-api.json index d9e69d22fff..0e07669d996 100644 --- a/games/v1/games-api.json +++ b/games/v1/games-api.json @@ -729,6 +729,21 @@ "https://www.googleapis.com/auth/games" ] }, + "getScopedPlayerIds": { + "description": "Retrieves scoped player identifiers for currently authenticated user.", + "flatPath": "games/v1/players/me/scopedIds", + "httpMethod": "GET", + "id": "games.players.getScopedPlayerIds", + "parameterOrder": [], + "parameters": {}, + "path": "games/v1/players/me/scopedIds", + "response": { + "$ref": "ScopedPlayerIds" + }, + "scopes": [ + "https://www.googleapis.com/auth/games" + ] + }, "list": { "description": "Get the collection of players for the currently authenticated user.", "flatPath": "games/v1/players/me/players/{collection}", @@ -1229,7 +1244,7 @@ } } }, - "revision": "20220330", + "revision": "20220525", "rootUrl": "https://games.googleapis.com/", "schemas": { "AchievementDefinition": { @@ -2943,6 +2958,21 @@ }, "type": "object" }, + "ScopedPlayerIds": { + "description": "Scoped player identifiers.", + "id": "ScopedPlayerIds", + "properties": { + "developerPlayerKey": { + "description": "Identifier of the player across all games of the given developer. Every player has the same developer_player_key in all games of one developer. Developer player key changes for the game if the game is transferred to another developer. Note that game_player_id will stay unchanged.", + "type": "string" + }, + "gamePlayerId": { + "description": "Game-scoped player identifier. This is the same id that is returned in GetPlayer game_player_id field.", + "type": "string" + } + }, + "type": "object" + }, "ScoreSubmission": { "description": "A request to submit a score to leaderboards.", "id": "ScoreSubmission", diff --git a/games/v1/games-gen.go b/games/v1/games-gen.go index a2d60e91f01..559a5418cbe 100644 --- a/games/v1/games-gen.go +++ b/games/v1/games-gen.go @@ -2827,6 +2827,47 @@ func (s *RevisionCheckResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ScopedPlayerIds: Scoped player identifiers. +type ScopedPlayerIds struct { + // DeveloperPlayerKey: Identifier of the player across all games of the + // given developer. Every player has the same developer_player_key in + // all games of one developer. Developer player key changes for the game + // if the game is transferred to another developer. Note that + // game_player_id will stay unchanged. + DeveloperPlayerKey string `json:"developerPlayerKey,omitempty"` + + // GamePlayerId: Game-scoped player identifier. This is the same id that + // is returned in GetPlayer game_player_id field. + GamePlayerId string `json:"gamePlayerId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DeveloperPlayerKey") + // 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. "DeveloperPlayerKey") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ScopedPlayerIds) MarshalJSON() ([]byte, error) { + type NoMethod ScopedPlayerIds + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ScoreSubmission: A request to submit a score to leaderboards. type ScoreSubmission struct { // Kind: Uniquely identifies the type of this resource. Value is always @@ -6244,6 +6285,136 @@ func (c *PlayersGetCall) Do(opts ...googleapi.CallOption) (*Player, error) { } +// method id "games.players.getScopedPlayerIds": + +type PlayersGetScopedPlayerIdsCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetScopedPlayerIds: Retrieves scoped player identifiers for currently +// authenticated user. +func (r *PlayersService) GetScopedPlayerIds() *PlayersGetScopedPlayerIdsCall { + c := &PlayersGetScopedPlayerIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PlayersGetScopedPlayerIdsCall) Fields(s ...googleapi.Field) *PlayersGetScopedPlayerIdsCall { + 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 *PlayersGetScopedPlayerIdsCall) IfNoneMatch(entityTag string) *PlayersGetScopedPlayerIdsCall { + 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 *PlayersGetScopedPlayerIdsCall) Context(ctx context.Context) *PlayersGetScopedPlayerIdsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PlayersGetScopedPlayerIdsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PlayersGetScopedPlayerIdsCall) doRequest(alt string) (*http.Response, 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, "games/v1/players/me/scopedIds") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "games.players.getScopedPlayerIds" call. +// Exactly one of *ScopedPlayerIds or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ScopedPlayerIds.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PlayersGetScopedPlayerIdsCall) Do(opts ...googleapi.CallOption) (*ScopedPlayerIds, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ScopedPlayerIds{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves scoped player identifiers for currently authenticated user.", + // "flatPath": "games/v1/players/me/scopedIds", + // "httpMethod": "GET", + // "id": "games.players.getScopedPlayerIds", + // "parameterOrder": [], + // "parameters": {}, + // "path": "games/v1/players/me/scopedIds", + // "response": { + // "$ref": "ScopedPlayerIds" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/games" + // ] + // } + +} + // method id "games.players.list": type PlayersListCall struct { diff --git a/people/v1/people-api.json b/people/v1/people-api.json index ef13c47b330..c7665b2228d 100644 --- a/people/v1/people-api.json +++ b/people/v1/people-api.json @@ -395,7 +395,7 @@ ] }, "list": { - "description": "List all \"Other contacts\", that is contacts that are not in a contact group. \"Other contacts\" are typically auto created contacts from interactions. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an google.rpc.ErrorInfo with reason \"EXPIRED_SYNC_TOKEN\". In the case of such an error clients should make a full sync request without a `sync_token`. The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at [List the user's other contacts that have changed](/people/v1/other-contacts#list_the_users_other_contacts_that_have_changed).", + "description": "List all \"Other contacts\", that is contacts that are not in a contact group. \"Other contacts\" are typically auto created contacts from interactions. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an [google.rpc.ErrorInfo](https://cloud.google.com/apis/design/errors#error_info) with reason \"EXPIRED_SYNC_TOKEN\". In the case of such an error clients should make a full sync request without a `sync_token`. The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at [List the user's other contacts that have changed](/people/v1/other-contacts#list_the_users_other_contacts_that_have_changed).", "flatPath": "v1/otherContacts", "httpMethod": "GET", "id": "people.otherContacts.list", @@ -1074,7 +1074,7 @@ "connections": { "methods": { "list": { - "description": "Provides a list of the authenticated user's contacts. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an google.rpc.ErrorInfo with reason \"EXPIRED_SYNC_TOKEN\". In the case of such an error clients should make a full sync request without a `sync_token`. The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at [List the user's contacts that have changed](/people/v1/contacts#list_the_users_contacts_that_have_changed).", + "description": "Provides a list of the authenticated user's contacts. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an [google.rpc.ErrorInfo](https://cloud.google.com/apis/design/errors#error_info) with reason \"EXPIRED_SYNC_TOKEN\". In the case of such an error clients should make a full sync request without a `sync_token`. The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at [List the user's contacts that have changed](/people/v1/contacts#list_the_users_contacts_that_have_changed).", "flatPath": "v1/people/{peopleId}/connections", "httpMethod": "GET", "id": "people.people.connections.list", @@ -1172,7 +1172,7 @@ } } }, - "revision": "20220522", + "revision": "20220531", "rootUrl": "https://people.googleapis.com/", "schemas": { "Address": { diff --git a/people/v1/people-gen.go b/people/v1/people-gen.go index a9ed29661a5..e00b14fa990 100644 --- a/people/v1/people-gen.go +++ b/people/v1/people-gen.go @@ -4693,18 +4693,20 @@ type OtherContactsListCall struct { // contact group. "Other contacts" are typically auto created contacts // from interactions. Sync tokens expire 7 days after the full sync. A // request with an expired sync token will get an error with an -// google.rpc.ErrorInfo with reason "EXPIRED_SYNC_TOKEN". In the case of -// such an error clients should make a full sync request without a -// `sync_token`. The first page of a full sync request has an additional -// quota. If the quota is exceeded, a 429 error will be returned. This -// quota is fixed and can not be increased. When the `sync_token` is -// specified, resources deleted since the last sync will be returned as -// a person with `PersonMetadata.deleted` set to true. When the -// `page_token` or `sync_token` is specified, all other request -// parameters must match the first call. Writes may have a propagation -// delay of several minutes for sync requests. Incremental syncs are not -// intended for read-after-write use cases. See example usage at List -// the user's other contacts that have changed +// google.rpc.ErrorInfo +// (https://cloud.google.com/apis/design/errors#error_info) with reason +// "EXPIRED_SYNC_TOKEN". In the case of such an error clients should +// make a full sync request without a `sync_token`. The first page of a +// full sync request has an additional quota. If the quota is exceeded, +// a 429 error will be returned. This quota is fixed and can not be +// increased. When the `sync_token` is specified, resources deleted +// since the last sync will be returned as a person with +// `PersonMetadata.deleted` set to true. When the `page_token` or +// `sync_token` is specified, all other request parameters must match +// the first call. Writes may have a propagation delay of several +// minutes for sync requests. Incremental syncs are not intended for +// read-after-write use cases. See example usage at List the user's +// other contacts that have changed // (/people/v1/other-contacts#list_the_users_other_contacts_that_have_cha // nged). func (r *OtherContactsService) List() *OtherContactsListCall { @@ -4884,7 +4886,7 @@ func (c *OtherContactsListCall) Do(opts ...googleapi.CallOption) (*ListOtherCont } return ret, nil // { - // "description": "List all \"Other contacts\", that is contacts that are not in a contact group. \"Other contacts\" are typically auto created contacts from interactions. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an google.rpc.ErrorInfo with reason \"EXPIRED_SYNC_TOKEN\". In the case of such an error clients should make a full sync request without a `sync_token`. The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at [List the user's other contacts that have changed](/people/v1/other-contacts#list_the_users_other_contacts_that_have_changed).", + // "description": "List all \"Other contacts\", that is contacts that are not in a contact group. \"Other contacts\" are typically auto created contacts from interactions. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an [google.rpc.ErrorInfo](https://cloud.google.com/apis/design/errors#error_info) with reason \"EXPIRED_SYNC_TOKEN\". In the case of such an error clients should make a full sync request without a `sync_token`. The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at [List the user's other contacts that have changed](/people/v1/other-contacts#list_the_users_other_contacts_that_have_changed).", // "flatPath": "v1/otherContacts", // "httpMethod": "GET", // "id": "people.otherContacts.list", @@ -7682,7 +7684,8 @@ type PeopleConnectionsListCall struct { // List: Provides a list of the authenticated user's contacts. Sync // tokens expire 7 days after the full sync. A request with an expired -// sync token will get an error with an google.rpc.ErrorInfo with reason +// sync token will get an error with an google.rpc.ErrorInfo +// (https://cloud.google.com/apis/design/errors#error_info) with reason // "EXPIRED_SYNC_TOKEN". In the case of such an error clients should // make a full sync request without a `sync_token`. The first page of a // full sync request has an additional quota. If the quota is exceeded, @@ -7898,7 +7901,7 @@ func (c *PeopleConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConne } return ret, nil // { - // "description": "Provides a list of the authenticated user's contacts. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an google.rpc.ErrorInfo with reason \"EXPIRED_SYNC_TOKEN\". In the case of such an error clients should make a full sync request without a `sync_token`. The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at [List the user's contacts that have changed](/people/v1/contacts#list_the_users_contacts_that_have_changed).", + // "description": "Provides a list of the authenticated user's contacts. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an [google.rpc.ErrorInfo](https://cloud.google.com/apis/design/errors#error_info) with reason \"EXPIRED_SYNC_TOKEN\". In the case of such an error clients should make a full sync request without a `sync_token`. The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at [List the user's contacts that have changed](/people/v1/contacts#list_the_users_contacts_that_have_changed).", // "flatPath": "v1/people/{peopleId}/connections", // "httpMethod": "GET", // "id": "people.people.connections.list",